diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-03-21 01:58:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:58:21 -0500 |
commit | fdeabdefb227be9aa932f59a23ddb47e003e643e (patch) | |
tree | 79e3cddb546374bf2b0137bf1463e70746c4d436 /include | |
parent | 8b42ec39264a1e7a508f5d80169a5fb137bcc833 (diff) |
[BRIDGE]: netfilter inline cleanup
Move nf_bridge_alloc from header file to the one place it is
used and optimize it.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter_bridge.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index de4d397865ce..a75b84bb9a88 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -47,22 +47,6 @@ enum nf_br_hook_priorities { | |||
47 | #define BRNF_BRIDGED 0x08 | 47 | #define BRNF_BRIDGED 0x08 |
48 | #define BRNF_NF_BRIDGE_PREROUTING 0x10 | 48 | #define BRNF_NF_BRIDGE_PREROUTING 0x10 |
49 | 49 | ||
50 | static inline | ||
51 | struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb) | ||
52 | { | ||
53 | struct nf_bridge_info **nf_bridge = &(skb->nf_bridge); | ||
54 | |||
55 | if ((*nf_bridge = kmalloc(sizeof(**nf_bridge), GFP_ATOMIC)) != NULL) { | ||
56 | atomic_set(&(*nf_bridge)->use, 1); | ||
57 | (*nf_bridge)->mask = 0; | ||
58 | (*nf_bridge)->physindev = (*nf_bridge)->physoutdev = NULL; | ||
59 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | ||
60 | (*nf_bridge)->netoutdev = NULL; | ||
61 | #endif | ||
62 | } | ||
63 | |||
64 | return *nf_bridge; | ||
65 | } | ||
66 | 50 | ||
67 | /* Only used in br_forward.c */ | 51 | /* Only used in br_forward.c */ |
68 | static inline | 52 | static inline |
@@ -77,17 +61,6 @@ void nf_bridge_maybe_copy_header(struct sk_buff *skb) | |||
77 | } | 61 | } |
78 | } | 62 | } |
79 | 63 | ||
80 | static inline | ||
81 | void nf_bridge_save_header(struct sk_buff *skb) | ||
82 | { | ||
83 | int header_size = 16; | ||
84 | |||
85 | if (skb->protocol == __constant_htons(ETH_P_8021Q)) | ||
86 | header_size = 18; | ||
87 | |||
88 | memcpy(skb->nf_bridge->data, skb->data - header_size, header_size); | ||
89 | } | ||
90 | |||
91 | /* This is called by the IP fragmenting code and it ensures there is | 64 | /* This is called by the IP fragmenting code and it ensures there is |
92 | * enough room for the encapsulating header (if there is one). */ | 65 | * enough room for the encapsulating header (if there is one). */ |
93 | static inline | 66 | static inline |