Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit aeeb12c2cccfbb068624f11473d18c232284dadb Merge: f2a1300 91890af Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 11 16:25:00 2013 +0800
Merge branch 'next'
Conflicts: main.h
aeeb12c2cccfbb068624f11473d18c232284dadb compat.h | 6 ++++++ main.h | 2 +- soft-interface.c | 8 ++++++++ soft-interface.h | 16 ++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-)
diff --cc soft-interface.c index 450dd7c,59b7397..a5159ed --- a/soft-interface.c +++ b/soft-interface.c @@@ -390,24 -388,18 +390,32 @@@ void batadv_interface_rx(struct net_dev batadv_tt_add_temporary_global_entry(bat_priv, orig_node, ethhdr->h_source, vid);
- if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest, - vid)) + if (is_multicast_ether_addr(ethhdr->h_dest)) { + /* set the mark on broadcast packets if AP isolation is ON and + * the packet is coming from an "isolated" client + */ + if (batadv_vlan_ap_isola_get(bat_priv, vid) && + batadv_tt_global_is_isolated(bat_priv, ethhdr->h_source, + vid)) { + /* save bits in skb->mark not covered by the mask and + * apply the mark on the rest + */ + skb->mark &= ~bat_priv->isolation_mark_mask; + skb->mark |= bat_priv->isolation_mark; + } + } else 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;