summaryrefslogtreecommitdiff
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorBart De Schuymer <bart.de.schuymer@pandora.be>2002-10-27 13:06:43 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2002-10-27 13:06:43 -0800
commit0aa30dc6d808962a3a4eb5cd64014e3f45e396e1 (patch)
tree155400d24b486ea580be0b10b52d6a3fdc073d48 /include/linux/skbuff.h
parent500ae766efda3219964941aba3568af173f85002 (diff)
[BRIDGE]: bridge-nf, map IPv4 hooks onto bridge hooks.
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 26467b154cdd..19637aa48a7e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -96,6 +96,17 @@ struct nf_conntrack {
struct nf_ct_info {
struct nf_conntrack *master;
};
+
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+struct nf_bridge_info {
+ atomic_t use;
+ struct net_device *physindev;
+ struct net_device *physoutdev;
+ unsigned int mask;
+ unsigned long hh[16 / sizeof(unsigned long)];
+};
+#endif
+
#endif
struct sk_buff_head {
@@ -166,6 +177,7 @@ struct skb_shared_info {
* @nfcache: Cache info
* @nfct: Associated connection, if any
* @nf_debug: Netfilter debugging
+ * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
* @tc_index: Traffic control index
*/
@@ -236,6 +248,9 @@ struct sk_buff {
#ifdef CONFIG_NETFILTER_DEBUG
unsigned int nf_debug;
#endif
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+ struct nf_bridge_info *nf_bridge;
+#endif
#endif /* CONFIG_NETFILTER */
#if defined(CONFIG_HIPPI)
union {
@@ -1146,6 +1161,20 @@ static inline void nf_conntrack_get(struct nf_ct_info *nfct)
if (nfct)
atomic_inc(&nfct->master->use);
}
+
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge)
+{
+ if (nf_bridge && atomic_dec_and_test(&nf_bridge->use))
+ kfree(nf_bridge);
+}
+static inline void nf_bridge_get(struct nf_bridge_info *nf_bridge)
+{
+ if (nf_bridge)
+ atomic_inc(&nf_bridge->use);
+}
+#endif
+
#endif
#endif /* __KERNEL__ */