[next] batman-adv: fix batman-adv header overhead calculation

Message ID 1389789573-1680-1-git-send-email-mareklindner@neomailbox.ch (mailing list archive)
State Accepted, archived
Commit 746d6436f88899a79c1cb3b27af0614510368bb7
Headers

Commit Message

Marek Lindner Jan. 15, 2014, 12:39 p.m. UTC
  Batman-adv prepends a full ethernet header in addition to its own
header. This has to be reflected in the MTU calculation.

Introduced by f1f310d5c261f0214f85afea95d5cd11d49d64c6
("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>
---
 main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Marek Lindner Jan. 15, 2014, 10:39 p.m. UTC | #1
On Wednesday 15 January 2014 20:39:33 Marek Lindner wrote:
> Batman-adv prepends a full ethernet header in addition to its own
> header. This has to be reflected in the MTU calculation.
> 
> Introduced by f1f310d5c261f0214f85afea95d5cd11d49d64c6
> ("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>
> ---
>  main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in revision 746d643.

Regards,
Marek
  

Patch

diff --git a/main.c b/main.c
index 4547bf0..fd85205 100644
--- a/main.c
+++ b/main.c
@@ -277,7 +277,7 @@  int batadv_max_header_len(void)
 			   sizeof(struct batadv_coded_packet));
 #endif
 
-	return header_len;
+	return header_len + ETH_HLEN;
 }
 
 /**