netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: jorge@dti2.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCHv2] netns: oops in ip_frag_reasm incrementing stats
Date: Mon, 16 Mar 2009 22:05:41 +0100	[thread overview]
Message-ID: <49BEBF25.70008@gmail.com> (raw)
In-Reply-To: <49BE4192.7090706@dti2.net>

Jorge Boncompte [DTI2] wrote, On 03/16/2009 01:09 PM:

> dev can be NULL on ip_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.
> 
> Changes from v1:
>    - Fixed description
> 
> Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
> ---
> net/ipv4/ip_fragment.c |   14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
> index 6659ac0..8f150d5 100644
> --- a/net/ipv4/ip_fragment.c
> +++ b/net/ipv4/ip_fragment.c

...

> -static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev,
> +static int ip_frag_reasm(struct net *net, struct ipq *qp, struct sk_buff *prev,
> 			 struct net_device *dev)
> {
> 	struct iphdr *iph;
> @@ -548,7 +548,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev,
> 	iph = ip_hdr(head);
> 	iph->frag_off = 0;
> 	iph->tot_len = htons(len);
> -	IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMOKS);
> +	IP_INC_STATS_BH(net, IPSTATS_MIB_REASMOKS);


I didn't check this but isn't something like this possible here too?:

static inline int ip_frag_too_far(struct ipq *qp)
{
	...
        net = container_of(qp->q.net, struct net, ipv4.frags);
        IP_INC_STATS_BH(net, IPSTATS_MIB_REASMFAILS);

Jarek P.

  reply	other threads:[~2009-03-16 21:07 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 [this message]
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
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=49BEBF25.70008@gmail.com \
    --to=jarkao2@gmail.com \
    --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).