Re: [PATCH nf-next] netfilter: ctnetlink: use dump structure instead of raw args

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

 



On Wed, Feb 09, 2022 at 11:46:59AM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> > >  static int ctnetlink_done_list(struct netlink_callback *cb)
> > >  {
> > > -	if (cb->args[1])
> > > -		nf_ct_put((struct nf_conn *)cb->args[1]);
> > > +	struct ctnetlink_list_dump_ctx *ctx = (void *)cb->ctx;
> > 
> > Where is cb->ctx initialized?
> 
> Its zeroed in __netlink_dump_start, cb->ctx and cb->args are aliased
> via union inside netlink_callback struct.

Ah I see, it's all zero initially.

Thanks for explaining.



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

  Powered by Linux