Re: [PATCH nf-next] netfilter: nf_ct_ext: invoke destroy even when ext is not attached

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

 



Liping Zhang <zlpnobody@xxxxxxx> wrote:
> From: Liping Zhang <zlpnobody@xxxxxxxxx>
> 
> For NF_NAT_MANIP_SRC, we will insert the ct to the nat_bysource_table,
> then remove it from the nat_bysource_table via nat_extend->destroy.

Right, I forgot about that.

> But now, the nat extension is attached on demand, so if the nat extension
> is not attached, we will not be notified when the ct is destroyed, i.e.
> we may fail to remove ct from the nat_bysource_table.
>
> So just keep it simple, even if the extension is not attached, we will
> still invoke the related ext->destroy. And this will also preserve the
> flexibility for the future extension.

So afaics only helper and nat have destructors and both are safe to be
called if the extension isn't present.

IOW, this looks correct to me, thanks for finding and fixing this.
--
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