diff options
author | Dmitry Petukhov <dmgenp@gmail.com> | 2014-04-09 02:23:20 +0600 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-05-29 11:38:29 +0200 |
commit | 528738eb2da4924b5f8d74e99945bca1f9ca7bbd (patch) | |
tree | 55aa47a2bf36e701ad3d009ac05590f01b6c5d0e | |
parent | 568491238ce069e51b20768f66c1449d4fb43807 (diff) | |
download | lwn-528738eb2da4924b5f8d74e99945bca1f9ca7bbd.tar.gz lwn-528738eb2da4924b5f8d74e99945bca1f9ca7bbd.zip |
l2tp: take PMTU from tunnel UDP socket
[ Upstream commit f34c4a35d87949fbb0e0f31eba3c054e9f8199ba ]
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | net/l2tp/l2tp_ppp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index 44441c0c5037..9a0e5874e73e 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c @@ -754,9 +754,9 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, session->deref = pppol2tp_session_sock_put; /* If PMTU discovery was enabled, use the MTU that was discovered */ - dst = sk_dst_get(sk); + dst = sk_dst_get(tunnel->sock); if (dst != NULL) { - u32 pmtu = dst_mtu(__sk_dst_get(sk)); + u32 pmtu = dst_mtu(__sk_dst_get(tunnel->sock)); if (pmtu != 0) session->mtu = session->mru = pmtu - PPPOL2TP_HEADER_OVERHEAD; |