Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

l2tp: take PMTU from tunnel UDP socket

When l2tp driver tries to get PMTU for the tunnel destination, it uses
the pointer to struct sock that represents PPPoX socket, while it
should use the pointer that represents UDP socket of the tunnel.

Signed-off-by: Dmitry Petukhov <dmgenp@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dmitry Petukhov and committed by
David S. Miller
f34c4a35 629c9a8f

+2 -2
+2 -2
net/l2tp/l2tp_ppp.c
··· 753 753 session->deref = pppol2tp_session_sock_put; 754 754 755 755 /* If PMTU discovery was enabled, use the MTU that was discovered */ 756 - dst = sk_dst_get(sk); 756 + dst = sk_dst_get(tunnel->sock); 757 757 if (dst != NULL) { 758 - u32 pmtu = dst_mtu(__sk_dst_get(sk)); 758 + u32 pmtu = dst_mtu(__sk_dst_get(tunnel->sock)); 759 759 if (pmtu != 0) 760 760 session->mtu = session->mru = pmtu - 761 761 PPPOL2TP_HEADER_OVERHEAD;