From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: jorge@dti2.net, netdev@vger.kernel.org
Subject: Re: [PATCHv3] netns: oops in ip[6]_frag_reasm incrementing stats
Date: Thu, 19 Mar 2009 22:54:28 +0100 [thread overview]
Message-ID: <20090319215428.GA2714@ami.dom.local> (raw)
In-Reply-To: <20090318.232651.99085030.davem@davemloft.net>
On Wed, Mar 18, 2009 at 11:26:51PM -0700, David Miller wrote:
> From: Jarek Poplawski <jarkao2@gmail.com>
> Date: Wed, 18 Mar 2009 07:26:58 +0000
>
> > On 17-03-2009 14:54, Jorge Boncompte [DTI2] wrote:
> > > Jarek Poplawski escribió:
> > >> On Tue, Mar 17, 2009 at 12:55:42PM +0100, Jorge Boncompte [DTI2] wrote:
> > >>> dev can be NULL in ip[6]_frag_reasm for skb's coming from RAW sockets.
> > >>>
> > >>> Quagga's OSPFD sends fragmented packets on a RAW socket, when netfilter
> > >>> conntrack reassembles them on the OUTPUT path you hit this code path.
> > >>>
> > >>> You can test it with something like "hping2 -0 -d 2000 -f AA.BB.CC.DD"
> > >>>
> > >>> Changes from v2: (address comments from Jarek Poplawski)
> > >>> - Patch reworked to get the net pointer with container_of()
> > >>> instead of passing it to function calls.
> > >>> - Fix IPv6 code
> > >>> Changes from v1:
> > >>> - Fixed description
> > >> I guess David will be interested only with the final state of changes,
> > >> so v1 & v2 are not necessary here...
> > >>
> > >> Anyway, ipv4 looks OK to me, but ipv6 looks like something is
> > >> different:
> > >>> + IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
> > >> It still depends on dev != NULL in __in6_dev_get(). I see there
> > >> is also used skb->dst for similar things in ip6_frag_queue(), so I
> > >> don't know: it needs rethinking, and maybe these patches should be
> > >> separated if you prefer.
> > >
> > > Not my day! :-) I should not look at code at 2 am and write patches
> > > the day after, I confused _idev and idev in the check for != NULL in _DEVINC.
> > >
> > > I think this bug was first introduced by patch "[IPV6]: Per-interface
> > > statistics support." from YOSHIFUJI Hideaki on Nov 4, 2006.
> > >
> > > If someone with more knowledge could confirm that using something like...
> > >
> > > "(skb->dev ? skb->dev : skb->dst->dev)"
> > >
> > > ... here is fine I'll redo this part and resend. I do not have an IPv6 setup where
> > > I can test this.
> > >
> >
> > skb->dst->dev is used in ip6_frag_queue anyway, so it shouldn't be
> > worse if you do this similarly in ip6_frag_reasm. If you send it as
> > a separate patch, and write it's not tested, David will decide if he
> > wants it. Otherwise you can resend this ipv4 patch only.
>
> Netfilter on ipv6 handles reassembly differently and in a way
> that won't result in dev being NULL here.
>
> I've applied Jorge's patch, thanks everyone.
My proposal is to revert the ipv6/reassembly part of this patch yet;
it doesn't fix anything, and the changelog is only misleading if it's
like you said.
Jarek P.
next prev parent reply other threads:[~2009-03-19 21:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 16:21 [PATCH] netns: oops in ip_frag_reasm incrementing stats Jorge Boncompte [DTI2]
2009-03-13 16:35 ` [PATCHv2] " Jorge Boncompte [DTI2]
2009-03-16 12:09 ` Jorge Boncompte [DTI2]
2009-03-16 21:05 ` Jarek Poplawski
2009-03-16 21:53 ` Jorge Boncompte [DTI2]
2009-03-16 22:05 ` Jarek Poplawski
2009-03-16 22:46 ` Jarek Poplawski
2009-03-17 11:55 ` [PATCHv3] netns: oops in ip[6]_frag_reasm " Jorge Boncompte [DTI2]
2009-03-17 13:21 ` Jarek Poplawski
2009-03-17 13:54 ` Jorge Boncompte [DTI2]
2009-03-18 7:26 ` Jarek Poplawski
2009-03-19 6:26 ` David Miller
2009-03-19 21:54 ` Jarek Poplawski [this message]
2009-03-19 21:56 ` David Miller
2009-03-19 22:09 ` Jarek Poplawski
2009-03-13 18:46 ` [PATCH] netns: oops in ip_frag_reasm " David Miller
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=20090319215428.GA2714@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--cc=jorge@dti2.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).