Yasuyuki KOZAKAI wrote:
> This kills the global 'destroy' operation which was
used by NAT.
> Instead it uses the extension infrastructure so that
multiple
> extensions can register own operations.
Applied, very nice
>
> +/* Noone using conntrack by the time this called. */
> +static void nf_nat_cleanup_conntrack(struct nf_conn
*ct)
> +{
> + struct nf_conn_nat *nat = nf_ct_ext_find(ct,
NF_CT_EXT_NAT);
> +
> + if (nat == NULL || nat->info.ct == NULL)
> + return;
These conditions would actually be BUG()s, right?
> +
> + NF_CT_ASSERT(nat->info.ct->status &
IPS_NAT_DONE_MASK);
> +
> + write_lock_bh(&nf_nat_lock);
> + list_del(&nat->info.bysource);
> + nat->info.ct = NULL;
> + write_unlock_bh(&nf_nat_lock);
> +}
> +
|