diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2012-01-22 14:00:25 -0500 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-04-11 08:28:59 -0400 |
commit | b1a8c04b8af74158e006b92a9e7e0f619e1a9409 (patch) | |
tree | adef581f143ddcd055313574a1f5b650a3521686 /net/batman-adv/soft-interface.c | |
parent | fe2da6ff27c73c1d102ec2189f94e8bc729d1a9b (diff) |
batman-adv: drop STP over batman
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 4d639b303bd7..10ab49aa568f 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -130,6 +130,8 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) | |||
130 | struct hard_iface *primary_if = NULL; | 130 | struct hard_iface *primary_if = NULL; |
131 | struct bcast_packet *bcast_packet; | 131 | struct bcast_packet *bcast_packet; |
132 | struct vlan_ethhdr *vhdr; | 132 | struct vlan_ethhdr *vhdr; |
133 | static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, | ||
134 | 0x00}; | ||
133 | unsigned int header_len = 0; | 135 | unsigned int header_len = 0; |
134 | int data_len = skb->len, ret; | 136 | int data_len = skb->len, ret; |
135 | short vid = -1; | 137 | short vid = -1; |
@@ -159,6 +161,12 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) | |||
159 | /* Register the client MAC in the transtable */ | 161 | /* Register the client MAC in the transtable */ |
160 | tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif); | 162 | tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif); |
161 | 163 | ||
164 | /* don't accept stp packets. STP does not help in meshes. | ||
165 | * better use the bridge loop avoidance ... | ||
166 | */ | ||
167 | if (compare_eth(ethhdr->h_dest, stp_addr)) | ||
168 | goto dropped; | ||
169 | |||
162 | if (is_multicast_ether_addr(ethhdr->h_dest)) { | 170 | if (is_multicast_ether_addr(ethhdr->h_dest)) { |
163 | do_bcast = true; | 171 | do_bcast = true; |
164 | 172 | ||