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 <dmgenp@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
					parent
					
						
							
								629c9a8fd0
							
						
					
				
			
			
				commit
				
					
						f34c4a35d8
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -753,9 +753,9 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, | ||||||
| 	session->deref = pppol2tp_session_sock_put; | 	session->deref = pppol2tp_session_sock_put; | ||||||
| 
 | 
 | ||||||
| 	/* If PMTU discovery was enabled, use the MTU that was discovered */ | 	/* 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) { | 	if (dst != NULL) { | ||||||
| 		u32 pmtu = dst_mtu(__sk_dst_get(sk)); | 		u32 pmtu = dst_mtu(__sk_dst_get(tunnel->sock)); | ||||||
| 		if (pmtu != 0) | 		if (pmtu != 0) | ||||||
| 			session->mtu = session->mru = pmtu - | 			session->mtu = session->mru = pmtu - | ||||||
| 				PPPOL2TP_HEADER_OVERHEAD; | 				PPPOL2TP_HEADER_OVERHEAD; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dmitry Petukhov
				Dmitry Petukhov