From: Steffen Klassert <steffen.klassert@secunet•com>
To: "Yurij M. Plotnikov" <Yurij.Plotnikov@oktetlabs•ru>
Cc: Ben Hutchings <bhutchings@solarflare•com>,
netdev@vger•kernel.org,
"Alexandra N. Kossovsky" <Alexandra.Kossovsky@oktetlabs•ru>
Subject: Re: PMTU discovery is broken on kernel 3.7.1 for UDP sockets
Date: Fri, 21 Dec 2012 11:22:53 +0100 [thread overview]
Message-ID: <20121221102253.GO18940@secunet.com> (raw)
In-Reply-To: <20121220123535.GN18940@secunet.com>
On Thu, Dec 20, 2012 at 01:35:35PM +0100, Steffen Klassert wrote:
> On Thu, Dec 20, 2012 at 03:22:13PM +0400, Yurij M. Plotnikov wrote:
> > On 12/20/12 11:34, Steffen Klassert wrote:
> > >
> > >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.
next prev parent reply other threads:[~2012-12-21 10:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 13:10 PMTU discovery is broken on kernel 3.7.1 for UDP sockets Yurij M. Plotnikov
2012-12-19 13:35 ` Ben Hutchings
2012-12-19 14:27 ` Yurij M. Plotnikov
2012-12-19 19:37 ` Ben Hutchings
2012-12-20 7:14 ` Yurij M. Plotnikov
2012-12-20 7:34 ` Steffen Klassert
2012-12-20 11:22 ` Yurij M. Plotnikov
2012-12-20 12:35 ` Steffen Klassert
2012-12-21 10:22 ` Steffen Klassert [this message]
2013-01-14 8:26 ` Yurij M. Plotnikov
2013-01-14 12:52 ` Steffen Klassert
2013-01-18 8:11 ` Steffen Klassert
2013-01-18 8:14 ` [RFC PATCH 1/3] ipv4: Invalidate the socket cached route on pmtu events if possible Steffen Klassert
2013-01-18 19:38 ` David Miller
2013-01-19 0:54 ` Julian Anastasov
2013-01-21 6:43 ` Steffen Klassert
2013-01-18 8:15 ` [RFC PATCH 2/3] ipv4: Add a socket release callback for datagram sockets Steffen Klassert
2013-01-18 19:39 ` David Miller
2013-01-18 8:16 ` [RFC PATCH 3/3] xfrm4: Invalidate all ipv4 routes on IPsec pmtu events Steffen Klassert
2013-01-18 19:39 ` David Miller
2013-01-21 6:48 ` Steffen Klassert
2013-01-21 12:04 ` Steffen Klassert
2013-01-21 11:31 ` PMTU discovery is broken on kernel 3.7.1 for UDP sockets Yurij M. Plotnikov
2013-01-21 11:38 ` Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121221102253.GO18940@secunet.com \
--to=steffen.klassert@secunet$(echo .)com \
--cc=Alexandra.Kossovsky@oktetlabs$(echo .)ru \
--cc=Yurij.Plotnikov@oktetlabs$(echo .)ru \
--cc=bhutchings@solarflare$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox