Re: [PATCH nf] netfilter: nf_reject: init skb->dev for reset packet

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

 



Florian Westphal wrote:
> Willem de Bruijn <willemdebruijn.kernel@xxxxxxxxx> wrote:
> > > I named the copypasta as nf_skb_get_hash. If placed in sk_buff.h:
> > > net_get_hash_net()?
> > > skb_get_hash()?
> > 
> > Still passing an skb too, so skb_get_hash_net()?
> 
> Sounds good to me.
> 
> > > And if either of that exists, maybe then use
> > > skb_get_hash_symmetric_net(net, skb)
> > 
> > If symmetric is equally good for nft, that would be preferable, as it
> > avoids the extra function. But I suppose it aliases the two flow
> > directions, which may be exactly what you don't want?
> 
> It would actually be fine, but the more important part is that
> skb->hash is set.
> 
> For the trace id, I want a stable identifier that won't change
> (e.g. when nat rewrites addresses).
> 
> This currently works because skb_get_hash computes it at most once.

Probably not relevant to these skbs, that don't have an skb->sk.

But in case skbs coming from the TCP stack are also in scope: can
sk_rethink_txhash cause problems?
 
> skb_get_hash_symmetric_net() will be used from nft_hash.c as
> __skb_get_hash_symmetric "replacement".
> 
> Pablo, you can drop this patch, I will try the 'pass net to dissector'
> route.






[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux