diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2010-04-15 06:14:51 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-04-15 06:14:51 -0400 |
commit | ea2d9b41bd418894d1ee25de1642c3325d71c397 (patch) | |
tree | e8187786c8d83123da104476fc0eb7132ec29045 /include | |
parent | 9c6eb28aca52d562f3ffbaebaa56385df9972a43 (diff) |
netfilter: bridge-netfilter: simplify IP DNAT
Remove br_netfilter.c::br_nf_local_out(). The function
br_nf_local_out() was needed because the PF_BRIDGE::LOCAL_OUT hook
could be called when IP DNAT happens on to-be-bridged traffic. The
new scheme eliminates this mess.
Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter_bridge.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index f8105e54716a..ffab6c423a57 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -41,9 +41,8 @@ enum nf_br_hook_priorities { | |||
41 | 41 | ||
42 | #define BRNF_PKT_TYPE 0x01 | 42 | #define BRNF_PKT_TYPE 0x01 |
43 | #define BRNF_BRIDGED_DNAT 0x02 | 43 | #define BRNF_BRIDGED_DNAT 0x02 |
44 | #define BRNF_DONT_TAKE_PARENT 0x04 | 44 | #define BRNF_BRIDGED 0x04 |
45 | #define BRNF_BRIDGED 0x08 | 45 | #define BRNF_NF_BRIDGE_PREROUTING 0x08 |
46 | #define BRNF_NF_BRIDGE_PREROUTING 0x10 | ||
47 | 46 | ||
48 | 47 | ||
49 | /* Only used in br_forward.c */ | 48 | /* Only used in br_forward.c */ |
@@ -68,6 +67,18 @@ static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) | |||
68 | } | 67 | } |
69 | } | 68 | } |
70 | 69 | ||
70 | extern int br_handle_frame_finish(struct sk_buff *skb); | ||
71 | /* Only used in br_device.c */ | ||
72 | static inline int br_nf_pre_routing_finish_bridge_slow(struct sk_buff *skb) | ||
73 | { | ||
74 | struct nf_bridge_info *nf_bridge = skb->nf_bridge; | ||
75 | |||
76 | skb_pull(skb, ETH_HLEN); | ||
77 | nf_bridge->mask ^= BRNF_BRIDGED_DNAT; | ||
78 | skb->dev = nf_bridge->physindev; | ||
79 | return br_handle_frame_finish(skb); | ||
80 | } | ||
81 | |||
71 | /* This is called by the IP fragmenting code and it ensures there is | 82 | /* This is called by the IP fragmenting code and it ensures there is |
72 | * enough room for the encapsulating header (if there is one). */ | 83 | * enough room for the encapsulating header (if there is one). */ |
73 | static inline unsigned int nf_bridge_pad(const struct sk_buff *skb) | 84 | static inline unsigned int nf_bridge_pad(const struct sk_buff *skb) |