]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
batman-adv: initialise last_ttvn and tt_crc for the orig_node structure
authorAntonio Quartulli <ordex@autistici.org>
Wed, 6 Jul 2011 23:40:57 +0000 (01:40 +0200)
committerMarek Lindner <lindner_marek@yahoo.de>
Thu, 7 Jul 2011 16:49:26 +0000 (18:49 +0200)
The last_ttvn and tt_crc fields of the orig_node structure were not
initialised causing an immediate TT_REQ/RES dialogue even if not needed.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/originator.c

index 4cc94d4ba890e1802cc7167065cf2c2f211d908a..f3c3f620d1952eaab745a049cb5ed314f77529eb 100644 (file)
@@ -223,6 +223,8 @@ struct orig_node *get_orig_node(struct bat_priv *bat_priv, const uint8_t *addr)
        orig_node->bat_priv = bat_priv;
        memcpy(orig_node->orig, addr, ETH_ALEN);
        orig_node->router = NULL;
+       orig_node->tt_crc = 0;
+       atomic_set(&orig_node->last_ttvn, 0);
        orig_node->tt_buff = NULL;
        orig_node->tt_buff_len = 0;
        atomic_set(&orig_node->tt_size, 0);