• R. Parameswaran's avatar
    L2TP:Adjust intf MTU, add underlay L3, L2 hdrs. · b784e7eb
    R. Parameswaran authored
    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: default avatarR. Parameswaran <rparames@brocade.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b784e7eb
l2tp_eth.c 9.46 KB