batman-adv: don't check compat version twice
authorAntonio Quartulli <antonio@open-mesh.com>
Thu, 28 Mar 2013 13:21:12 +0000 (14:21 +0100)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 29 May 2013 00:44:53 +0000 (02:44 +0200)
Compatibility version is checked upon packet reception
before calling any handler. For this reason it does need to
be checked once more in the handler itself.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/bat_iv_ogm.c

index 6d62e2992dfa10821700166cd83ddc28ce4bd22d..38183dc6965d54a0e3e73a26f3a2aa8a59723695 100644 (file)
@@ -1054,13 +1054,6 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr,
        }
        rcu_read_unlock();
 
-       if (batadv_ogm_packet->header.version != BATADV_COMPAT_VERSION) {
-               batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
-                          "Drop packet: incompatible batman version (%i)\n",
-                          batadv_ogm_packet->header.version);
-               return;
-       }
-
        if (is_my_addr) {
                batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
                           "Drop packet: received my own broadcast (sender: %pM)\n",