Re: [PATCH] netfilter: nf_tables: coalesce multiple notifications into one skbuff

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

 



On Wed, Sep 02, 2020 at 04:16:39PM +0200, Phil Sutter wrote:
> Hi Pablo,
> 
> On Thu, Aug 27, 2020 at 07:28:42PM +0200, Pablo Neira Ayuso wrote:
> [...]
> > +static void nft_commit_notify(struct net *net, u32 portid)
> > +{
> > +	struct sk_buff *batch_skb = NULL, *nskb, *skb;
> > +	unsigned char *data;
> > +	int len;
> > +
> > +	list_for_each_entry_safe(skb, nskb, &net->nft.notify_list, list) {
> > +		if (!batch_skb) {
> > +new_batch:
> > +			batch_skb = skb;
> > +			NFT_CB(batch_skb).report = NFT_CB(skb).report;
> > +			len = NLMSG_GOODSIZE;
> 
> This doesn't account for the data in the first skb. After changing the
> line into 'len = NLMSG_GOODSIZE - skb->len;', the reported problem
> disappears and the patch works as expected.

Thanks for narrowing down the problem.

I'll send a v2 including this update.



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

  Powered by Linux