Skip to content

Commit

Permalink
batman-adv: fix batman-adv header overhead calculation
Browse files Browse the repository at this point in the history
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 411d6ed
("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>
  • Loading branch information
Marek Lindner authored and Antonio Quartulli committed Jan 15, 2014
1 parent 51bb352 commit 1df0cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ int batadv_max_header_len(void)
sizeof(struct batadv_coded_packet));
#endif

return header_len;
return header_len + ETH_HLEN;
}

/**
Expand Down

0 comments on commit 1df0cbd

Please sign in to comment.