aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2012-01-22 14:00:24 -0500
committerAntonio Quartulli <ordex@autistici.org>2012-04-11 08:28:59 -0400
commitfe2da6ff27c73c1d102ec2189f94e8bc729d1a9b (patch)
tree143055e9de797c3b645d453a5d0c62d5c3d8af19 /net/batman-adv/routing.c
parent20ff9d593f8ff20c2ef24498f77a8bc30b3a059a (diff)
batman-adv: add broadcast duplicate check
When multiple backbone gateways relay the same broadcast from the backbone into the mesh, other nodes in the mesh may receive this broadcast multiple times. To avoid this, the crc checksums of received broadcasts are recorded and new broadcast packets with the same content may be dropped if received by another gateway. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 1d1fd04c9c3a..78eddc9067e6 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -1076,6 +1076,10 @@ int recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1076 1076
1077 spin_unlock_bh(&orig_node->bcast_seqno_lock); 1077 spin_unlock_bh(&orig_node->bcast_seqno_lock);
1078 1078
1079 /* check whether this has been sent by another originator before */
1080 if (bla_check_bcast_duplist(bat_priv, bcast_packet, hdr_size))
1081 goto out;
1082
1079 /* rebroadcast packet */ 1083 /* rebroadcast packet */
1080 add_bcast_packet_to_list(bat_priv, skb, 1); 1084 add_bcast_packet_to_list(bat_priv, skb, 1);
1081 1085