From: Dmitry Petukhov Date: Tue, 8 Apr 2014 20:23:20 +0000 (+0600) Subject: l2tp: take PMTU from tunnel UDP socket X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f34c4a35d879;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: David S. Miller --- 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, 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;