Thread (24 messages) flat view 24 messages, 5 authors, 2013-01-21

Re: PMTU discovery is broken on kernel 3.7.1 for UDP sockets

From: Yurij M. Plotnikov <hidden>
Date: 2013-01-14 08:27:14

On 12/21/12 14:22, Steffen Klassert wrote:
On Thu, Dec 20, 2012 at 01:35:35PM +0100, Steffen Klassert wrote:
   
quoted
On Thu, Dec 20, 2012 at 03:22:13PM +0400, Yurij M. Plotnikov wrote:
     
quoted
On 12/20/12 11:34, Steffen Klassert wrote:
       
quoted
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 3c9d208..1049ce0 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -1198,7 +1198,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
  	{
  		struct dst_entry *dst;
  		val = 0;
-		dst = sk_dst_get(sk);
+		dst = sk_dst_check(sk, 0);
  		if (dst) {
  			val = dst_mtu(dst);
  			dst_release(dst);
         
With this patch kernel 3.7.1 works perfect. All described problems
are fixed.
       
Thanks for testing!

I'm not sure if we can't use this as a fix. I think with this patch it
could happen that we return -ENOTCONN instead of a pmtu value on a
connected socket. Perhaps it is better to update the cached dst_entry in
ipv4_sk_update_pmtu() when we receive the -EMSGSIZE. I'll do some
investigation.

     
It turned out that updating the cached dst_entry in ipv4_sk_update_pmtu()
is not trivial. We need to implement proper socket locking and we need
socket release calback functions for all protocols that use
ipv4_sk_update_pmtu(), similar to tcp.

Today is my last office day for this year, so we probably have to defer
a solution to the next year.

Thanks.
   
Hi Steffen,

Could you, please, tell me is there any news about this bug?

Thanks in advance,
Yurij.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help