Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32830
b: refs/heads/master
c: 10ea6ac
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 25, 2006
1 parent 3c765c9 commit 480e381
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28658c8967da9083be83af0a37be3b190bae79da
refs/heads/master: 10ea6ac895418bd0d23900e3330daa6ba0836d26
16 changes: 16 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,19 @@ Why: These drivers never compiled since they were added to the kernel
Who: Jean Delvare <khali@linux-fr.org>

---------------------------

What: Bridge netfilter deferred IPv4/IPv6 output hook calling
When: January 2007
Why: The deferred output hooks are a layering violation causing unusual
and broken behaviour on bridge devices. Examples of things they
break include QoS classifation using the MARK or CLASSIFY targets,
the IPsec policy match and connection tracking with VLANs on a
bridge. Their only use is to enable bridge output port filtering
within iptables with the physdev match, which can also be done by
combining iptables and ebtables using netfilter marks. Until it
will get removed the hook deferral is disabled by default and is
only enabled when needed.

Who: Patrick McHardy <kaber@trash.net>

---------------------------
2 changes: 2 additions & 0 deletions trunk/include/linux/netfilter_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ struct bridge_skb_cb {
__u32 ipv4;
} daddr;
};

extern int brnf_deferred_hooks;
#endif /* CONFIG_BRIDGE_NETFILTER */

#endif /* __KERNEL__ */
Expand Down
5 changes: 5 additions & 0 deletions trunk/net/bridge/br_netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ static int brnf_filter_vlan_tagged = 1;
#define brnf_filter_vlan_tagged 1
#endif

int brnf_deferred_hooks;
EXPORT_SYMBOL_GPL(brnf_deferred_hooks);

static __be16 inline vlan_proto(const struct sk_buff *skb)
{
return vlan_eth_hdr(skb)->h_vlan_encapsulated_proto;
Expand Down Expand Up @@ -890,6 +893,8 @@ static unsigned int ip_sabotage_out(unsigned int hook, struct sk_buff **pskb,
return NF_ACCEPT;
else if (ip->version == 6 && !brnf_call_ip6tables)
return NF_ACCEPT;
else if (!brnf_deferred_hooks)
return NF_ACCEPT;
#endif
if (hook == NF_IP_POST_ROUTING)
return NF_ACCEPT;
Expand Down
15 changes: 15 additions & 0 deletions trunk/net/netfilter/xt_physdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,21 @@ checkentry(const char *tablename,
if (!(info->bitmask & XT_PHYSDEV_OP_MASK) ||
info->bitmask & ~XT_PHYSDEV_OP_MASK)
return 0;
if (brnf_deferred_hooks == 0 &&
info->bitmask & XT_PHYSDEV_OP_OUT &&
(!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) ||
info->invert & XT_PHYSDEV_OP_BRIDGED) &&
hook_mask & ((1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) |
(1 << NF_IP_POST_ROUTING))) {
printk(KERN_WARNING "physdev match: using --physdev-out in the "
"OUTPUT, FORWARD and POSTROUTING chains for non-bridged "
"traffic is deprecated and breaks other things, it will "
"be removed in January 2007. See Documentation/"
"feature-removal-schedule.txt for details. This doesn't "
"affect you in case you're using it for purely bridged "
"traffic.\n");
brnf_deferred_hooks = 1;
}
return 1;
}

Expand Down

0 comments on commit 480e381

Please sign in to comment.