* [PATCH net] l2tp: take PMTU from tunnel UDP socket
@ 2014-04-08 15:15 Dmitry Petukhov
2014-04-08 17:09 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Petukhov @ 2014-04-08 15:15 UTC (permalink / raw)
To: netdev
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>
---
net/l2tp/l2tp_ppp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] l2tp: take PMTU from tunnel UDP socket
2014-04-08 15:15 [PATCH net] l2tp: take PMTU from tunnel UDP socket Dmitry Petukhov
@ 2014-04-08 17:09 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-04-08 17:09 UTC (permalink / raw)
To: dmgenp; +Cc: netdev
From: Dmitry Petukhov <dmgenp@gmail.com>
Date: Tue, 8 Apr 2014 21:15:50 +0600
> 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>
> ---
> net/l2tp/l2tp_ppp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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,
Your patch has been corrupted by your email client, please fix this up
and resubmit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net] l2tp: take PMTU from tunnel UDP socket
@ 2014-04-08 20:23 Dmitry Petukhov
2014-04-09 19:25 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Petukhov @ 2014-04-08 20:23 UTC (permalink / raw)
To: netdev
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>
---
net/l2tp/l2tp_ppp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] l2tp: take PMTU from tunnel UDP socket
2014-04-08 20:23 Dmitry Petukhov
@ 2014-04-09 19:25 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-04-09 19:25 UTC (permalink / raw)
To: dmgenp; +Cc: netdev
From: Dmitry Petukhov <dmgenp@gmail.com>
Date: Wed, 9 Apr 2014 02:23:20 +0600
> 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>
Nice, 4 year old bug :-)
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-09 19:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08 15:15 [PATCH net] l2tp: take PMTU from tunnel UDP socket Dmitry Petukhov
2014-04-08 17:09 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2014-04-08 20:23 Dmitry Petukhov
2014-04-09 19:25 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).