[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP6LPsDCgCCxRhF4Pc+JZu_ZRou9RJ6SEEyk6Sa2sxtbqs_Gog@mail.gmail.com>
Date: Sun, 6 Apr 2014 00:58:27 +0600
From: Dmitry Petukhov <dmgenp@...il.com>
To: netdev@...r.kernel.org
Subject: net/l2tp/l2tp_ppp.c should take pmtu from tunnel socket
currently when it tries to get PMTU, it does
dst = sk_dst_get(sk);
...
u32 pmtu = dst_mtu(__sk_dst_get(sk));
where sk represents PPPoX socket
it should use tunnel UDP socket instead, tunnel->sock
This bug bite me when I tried to use l2tp vpn over the link with mtu <
1500 but where fragments were dropped somewere along the path. I tried
to use this mechanism with
ip route add <dst> via ... mtu <lower_mtu>
but it didn't work.
After the fix I was able to use this feature of l2tp_ppp driver, it
picked up mtu set by ip route and used it.
patch against https://github.com/torvalds/linux master:
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index d276e2d..950909f 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,
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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists