batman-adv: fix batman-adv header overhead calculation
authorMarek Lindner <mareklindner@neomailbox.ch>
Wed, 15 Jan 2014 12:31:18 +0000 (20:31 +0800)
committerAntonio Quartulli <antonio@meshcoding.com>
Wed, 15 Jan 2014 22:54:20 +0000 (23:54 +0100)
Batman-adv prepends a full ethernet header in addition to its own
header. This has to be reflected in the MTU calculation, especially
since the value is used to set dev->hard_header_len.

Introduced by 411d6ed93a5d0601980d3e5ce75de07c98e3a7de
("batman-adv: consider network coding overhead when calculating required mtu")

Reported-by: cmsv <cmsv@wirelesspt.net>
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
net/batman-adv/main.c

index 1511f64..faba0f6 100644 (file)
@@ -277,7 +277,7 @@ int batadv_max_header_len(void)
                           sizeof(struct batadv_coded_packet));
 #endif
 
-       return header_len;
+       return header_len + ETH_HLEN;
 }
 
 /**