diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2012-01-22 20:00:24 +0100 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-04-11 14:28:59 +0200 |
commit | fe2da6ff27c73c1d102ec2189f94e8bc729d1a9b (patch) | |
tree | 143055e9de797c3b645d453a5d0c62d5c3d8af19 /net/batman-adv/types.h | |
parent | 20ff9d593f8ff20c2ef24498f77a8bc30b3a059a (diff) | |
download | op-kernel-dev-fe2da6ff27c73c1d102ec2189f94e8bc729d1a9b.zip op-kernel-dev-fe2da6ff27c73c1d102ec2189f94e8bc729d1a9b.tar.gz |
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/types.h')
-rw-r--r-- | net/batman-adv/types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 35cd831..ad97e87 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -140,6 +140,11 @@ struct neigh_node { spinlock_t tq_lock; /* protects: tq_recv, tq_index */ }; +struct bcast_duplist_entry { + uint8_t orig[ETH_ALEN]; + uint16_t crc; + unsigned long entrytime; +}; struct bat_priv { atomic_t mesh_state; @@ -186,6 +191,8 @@ struct bat_priv { struct list_head tt_req_list; /* list of pending tt_requests */ struct list_head tt_roam_list; struct hashtable_t *vis_hash; + struct bcast_duplist_entry bcast_duplist[DUPLIST_SIZE]; + int bcast_duplist_curr; spinlock_t forw_bat_list_lock; /* protects forw_bat_list */ spinlock_t forw_bcast_list_lock; /* protects */ spinlock_t tt_changes_list_lock; /* protects tt_changes */ |