Skip to content

Commit

Permalink
l2tp: take PMTU from tunnel UDP socket
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dmitry Petukhov authored and davem330 committed Apr 9, 2014
1 parent 629c9a8 commit f34c4a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/l2tp/l2tp_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f34c4a3

Please sign in to comment.