aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Petukhov <dmgenp@gmail.com>2014-04-08 16:23:20 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-09 15:24:38 -0400
commitf34c4a35d87949fbb0e0f31eba3c054e9f8199ba (patch)
tree34b0e63285ba24f897998fd7dcf7102a107cff61
parent629c9a8fd0bbdfc6d702526b327470166ec39c6b (diff)
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>
-rw-r--r--net/l2tp/l2tp_ppp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index d276e2d4a589..950909f04ee6 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -753,9 +753,9 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
753 session->deref = pppol2tp_session_sock_put; 753 session->deref = pppol2tp_session_sock_put;
754 754
755 /* If PMTU discovery was enabled, use the MTU that was discovered */ 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 if (dst != NULL) { 757 if (dst != NULL) {
758 u32 pmtu = dst_mtu(__sk_dst_get(sk)); 758 u32 pmtu = dst_mtu(__sk_dst_get(tunnel->sock));
759 if (pmtu != 0) 759 if (pmtu != 0)
760 session->mtu = session->mru = pmtu - 760 session->mtu = session->mru = pmtu -
761 PPPOL2TP_HEADER_OVERHEAD; 761 PPPOL2TP_HEADER_OVERHEAD;