From 863cfd72265c2b687e145f1f7a78c7a2afaa1e84 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Sun, 22 Jan 2012 20:00:25 +0100 Subject: [PATCH] --- yaml --- r: 300587 b: refs/heads/master c: b1a8c04b8af74158e006b92a9e7e0f619e1a9409 h: refs/heads/master i: 300585: 645e17686597dce05fc5db7c85105412861cdc1e 300583: bdfef7188298f0177f74a9bba04f79fd754f8cea v: v3 --- [refs] | 2 +- trunk/net/batman-adv/soft-interface.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 13b0a9433f3f..7a6940bbd044 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe2da6ff27c73c1d102ec2189f94e8bc729d1a9b +refs/heads/master: b1a8c04b8af74158e006b92a9e7e0f619e1a9409 diff --git a/trunk/net/batman-adv/soft-interface.c b/trunk/net/batman-adv/soft-interface.c index 4d639b303bd7..10ab49aa568f 100644 --- a/trunk/net/batman-adv/soft-interface.c +++ b/trunk/net/batman-adv/soft-interface.c @@ -130,6 +130,8 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) struct hard_iface *primary_if = NULL; struct bcast_packet *bcast_packet; struct vlan_ethhdr *vhdr; + static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, + 0x00}; unsigned int header_len = 0; int data_len = skb->len, ret; short vid = -1; @@ -159,6 +161,12 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) /* Register the client MAC in the transtable */ tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif); + /* don't accept stp packets. STP does not help in meshes. + * better use the bridge loop avoidance ... + */ + if (compare_eth(ethhdr->h_dest, stp_addr)) + goto dropped; + if (is_multicast_ether_addr(ethhdr->h_dest)) { do_bcast = true;