Skip to contentSkip to conversation

batman-adv: don't check compat version twice

PATCH Applied Antonio Quartulli 2 participants 2 messages Mar 28, 2013 – Apr 3, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batman-adv: don't check compat version twice

From: Antonio Quartulli <[email protected]>

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.

---
 bat_iv_ogm.c | 7 -------
 1 file changed, 7 deletions(-)
bat_iv_ogm.c +0 -7
index 6d62e29..38183dc 100644
@@ -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",
Signature · 1 line
1.8.1.5
#1 lore raw
Quoted 10 lines · On Thursday, March 28, 2013 21:21:12 Antonio Quartulli wrote:

From: Antonio Quartulli <[email protected]>

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.

---
 bat_iv_ogm.c | 7 -------
 1 file changed, 7 deletions(-)

Applied in revision ae9218e.

Thanks,
Marek