]> git.baikalelectronics.ru Git - kernel.git/commit
L2TP:Adjust intf MTU, add underlay L3, L2 hdrs.
authorR. Parameswaran <parameswaran.r7@gmail.com>
Thu, 6 Apr 2017 00:00:07 +0000 (17:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 20:43:31 +0000 (13:43 -0700)
commit1319c5d225e888ff77132271def91c92dd79cf87
treee7b6849cecaf471b48c8859f6464bccd7680e5a3
parent34f9998260c9baa47dd63ee735f1efd298eda1de
L2TP:Adjust intf MTU, add underlay L3, L2 hdrs.

Existing L2TP kernel code does not derive the optimal MTU for Ethernet
pseudowires and instead leaves this to a userspace L2TP daemon or
operator. If an MTU is not specified, the existing kernel code chooses
an MTU that does not take account of all tunnel header overheads, which
can lead to unwanted IP fragmentation. When L2TP is used without a
control plane (userspace daemon), we would prefer that the kernel does a
better job of choosing a default pseudowire MTU, taking account of all
tunnel header overheads, including IP header options, if any. This patch
addresses this.

Change-set here uses the new kernel function, kernel_sock_ip_overhead(),
to factor the outer IP overhead on the L2TP tunnel socket (including
IP Options, if any) when calculating the default MTU for an Ethernet
pseudowire, along with consideration of the inner Ethernet header.

Signed-off-by: R. Parameswaran <rparames@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_eth.c