diff options
| author | Patrick McHardy <kaber@trash.net> | 2004-06-21 00:34:20 -0700 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2004-06-21 00:34:20 -0700 |
| commit | 02c83c2e15de9b2a06275388f0b288a2af92ad3e (patch) | |
| tree | f963938b452e7bef36541f436368799c3a354474 /include/linux/skbuff.h | |
| parent | d1cbbe08201b0ad4fddaf14fe4de6e70b0b8af55 (diff) | |
[NETFILTER]: Add new function 'nf_reset' to reset netfilter related skb-fields
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@redhat.com>
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 1b33d607f276..f47163e84760 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1109,6 +1109,14 @@ static inline void nf_conntrack_get(struct nf_ct_info *nfct) if (nfct) atomic_inc(&nfct->master->use); } +static inline void nf_reset(struct sk_buff *skb) +{ + nf_conntrack_put(skb->nfct); + skb->nfct = NULL; +#ifdef CONFIG_NETFILTER_DEBUG + skb->nf_debug = 0; +#endif +} #ifdef CONFIG_BRIDGE_NETFILTER static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge) @@ -1121,9 +1129,10 @@ static inline void nf_bridge_get(struct nf_bridge_info *nf_bridge) if (nf_bridge) atomic_inc(&nf_bridge->use); } -#endif - -#endif +#endif /* CONFIG_BRIDGE_NETFILTER */ +#else /* CONFIG_NETFILTER */ +static inline void nf_reset(struct sk_buff *skb) {} +#endif /* CONFIG_NETFILTER */ #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */ |
