Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit 96e211f71233b9052707e12cbf40c4e49cce3822 Merge: 03b50b5 9048eb6 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 11 02:24:16 2013 +0800
Merge branch 'maint' into next
96e211f71233b9052707e12cbf40c4e49cce3822 soft-interface.c | 8 ++++++++ soft-interface.h | 16 ++++++++++++++++ 2 files changed, 24 insertions(+)
diff --cc soft-interface.c index 36f0508,5dd1247..59b7397 --- a/soft-interface.c +++ b/soft-interface.c @@@ -386,12 -366,19 +386,20 @@@ void batadv_interface_rx(struct net_dev
if (orig_node) batadv_tt_add_temporary_global_entry(bat_priv, orig_node, - ethhdr->h_source); + ethhdr->h_source, vid);
- if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) + if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest, + vid)) goto dropped;
+ /* Clean the netfilter state before delivering the skb. + * This packet may have traversed a bridge when it was encapsulated into + * the batman header. Now that the header has been removed, the + * netfilter state must be cleaned up to avoid to mess up with a + * possible second bridge + */ + batadv_nf_bridge_skb_free(skb); + netif_rx(skb); goto out;
diff --cc soft-interface.h index 06fc91f,5c19c42..21b8573 --- a/soft-interface.h +++ b/soft-interface.h @@@ -28,9 -28,21 +28,25 @@@ struct net_device *batadv_softif_create void batadv_softif_destroy_sysfs(struct net_device *soft_iface); int batadv_softif_is_valid(const struct net_device *net_dev); extern struct rtnl_link_ops batadv_link_ops; +int batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid); +void batadv_softif_vlan_free_ref(struct batadv_softif_vlan *softif_vlan); +struct batadv_softif_vlan *batadv_softif_vlan_get(struct batadv_priv *bat_priv, + unsigned short vid);
+ #ifdef CONFIG_BRIDGE_NETFILTER + /** + * batadv_nf_bridge_skb_free - clean the NF bridge data in an skb + * @skb: the skb which nf data has to be free'd + */ + static inline void batadv_nf_bridge_skb_free(struct sk_buff *skb) + { + nf_bridge_put(skb->nf_bridge); + skb->nf_bridge = NULL; + } + #else + static inline void batadv_nf_bridge_skb_free(struct sk_buff *skb) + { + } + #endif /* CONFIG_BRIDGE_NETFILTER */ + #endif /* _NET_BATMAN_ADV_SOFT_INTERFACE_H_ */