diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-10-22 00:55:39 +0200 |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2011-10-25 14:23:05 +0200 |
commit | 93840ac40bb0d0f177ef8af74e64671be67e8c37 (patch) | |
tree | 3dd927a278ab6bd234520babaa5e8ddfbe4b276b /net/batman-adv | |
parent | 6e8014947d6469df1566e9e253805557c5c0e4e0 (diff) | |
download | linux-3.10-93840ac40bb0d0f177ef8af74e64671be67e8c37.tar.gz linux-3.10-93840ac40bb0d0f177ef8af74e64671be67e8c37.tar.bz2 linux-3.10-93840ac40bb0d0f177ef8af74e64671be67e8c37.zip |
batman-adv: unify hash_entry field position in tt_local/global_entry
Function tt_response_fill_table() actually uses a tt_local_entry pointer to
iterate either over the local or the global table entries (it depends on the
what hash table is passed as argument). To iterate over such entries the
hlist_for_each_entry_rcu() macro has to access their "hash_entry" field which
MUST be at the same position in both the tt_global/local_entry structures.
Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 25bd1db3537..51a0db7f644 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -223,22 +223,22 @@ struct socket_packet { struct tt_local_entry { uint8_t addr[ETH_ALEN]; + struct hlist_node hash_entry; unsigned long last_seen; uint16_t flags; atomic_t refcount; struct rcu_head rcu; - struct hlist_node hash_entry; }; struct tt_global_entry { uint8_t addr[ETH_ALEN]; + struct hlist_node hash_entry; /* entry in the global table */ struct orig_node *orig_node; uint8_t ttvn; uint16_t flags; /* only TT_GLOBAL_ROAM is used */ unsigned long roam_at; /* time at which TT_GLOBAL_ROAM was set */ atomic_t refcount; struct rcu_head rcu; - struct hlist_node hash_entry; /* entry in the global table */ }; struct tt_change_node { |