This makes broute a normal ebtables table, hooking at PREROUTING. The broute hook is removed. It uses skb->cb to signal to bridge rx handler that the skb should be routed instead of being bridged. This change is backwards compatible with ebtables as no userspace visible parts are changed. This means we can also remove the !ops test in ebt_register_table, it was only there for broute table sake.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -56,9 +56,6 @@ struct br_ip_list { · 55 unmodified lines | |||
| 56 | 56 | ||
| 57 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); | 57 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); |
| 58 | 58 | ||
| 59 | typedef int br_should_route_hook_t(struct sk_buff *skb); | ||
| 60 | extern br_should_route_hook_t __rcu *br_should_route_hook; | ||
| 61 | |||
| 62 | #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING) | 59 | #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING) |
| 63 | int br_multicast_list_adjacent(struct net_device *dev, | 60 | int br_multicast_list_adjacent(struct net_device *dev, |
| 64 | struct list_head *br_ip_list); | 61 | struct list_head *br_ip_list); |