Re: [PATCH nf] netfilter: nat: remove incorrect debug assert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 21, 2017 at 03:40:19PM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
[...]
> > > diff --git a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c
> > > ick_inndex f8aad03d674b..6f5e8d01b876 100644
> > > --- a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c
> > > +++ b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c
> > > @@ -255,11 +255,6 @@ nf_nat_ipv4_fn(void *priv, struct sk_buff *skb,
> > >  	/* maniptype == SRC for postrouting. */
> > >  	enum nf_nat_manip_type maniptype = HOOK2MANIP(state->hook);
> > >  
> > > -	/* We never see fragments: conntrack defrags on pre-routing
> > > -	 * and local-out, and nf_nat_out protects post-routing.
> > > -	 */
> > > -	NF_CT_ASSERT(!ip_is_fragment(ip_hdr(skb)));
> > > -
> 
> We could make this a explicit test+return but that seems weird too,
> we would track the first fragment but would not nat.

Right, that test+return just for this is weird.

> However, changing test to if (iph->frag_off) return -NF_ACCEPT seems
> wrong too because we have enough info to track. OTOH, this only happens
> with HDRINCL+raw socket so perhaps we shouldn't care about this and
> just change ipv4 l3 tracker to ignore all packets w. iph->frag_off set.

Florian, unless you rise your hand, I'm going to take this patch so we
at least fix splats here. I still have the impression that this
setsockopt() option and its interaction with netfilter is broken at
many levels.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux