diff options
author | Antonio Quartulli <antonio@meshcoding.com> | 2013-12-05 15:33:00 +0100 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-12-28 12:51:16 +0100 |
commit | 27a417e6badac911487c10990e04f5ccbb11b1b2 (patch) | |
tree | 7c3910eb29b61fdc3cea7e9c8eea14a2e0e1771c /net/batman-adv/main.c | |
parent | a40d9b075c21f06872de3f05cc2eb3d06665e2ff (diff) |
batman-adv: fix size of batadv_icmp_header
struct batadv_icmp_header currently has a size of 17, which
will be padded to 20 on some architectures. Fix this by
unrolling the header into the parent structures.
Moreover keep the ICMP parsing functions as generic as they
are now by using a stub icmp_header struct during packet
parsing.
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index d87778b9c5b..1511f64a6ce 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -426,8 +426,8 @@ static void batadv_recv_handler_init(void) BUILD_BUG_ON(offsetof(struct batadv_unicast_packet, dest) != 4); BUILD_BUG_ON(offsetof(struct batadv_unicast_tvlv_packet, dst) != 4); BUILD_BUG_ON(offsetof(struct batadv_frag_packet, dest) != 4); - BUILD_BUG_ON(offsetof(struct batadv_icmp_packet, icmph.dst) != 4); - BUILD_BUG_ON(offsetof(struct batadv_icmp_packet_rr, icmph.dst) != 4); + BUILD_BUG_ON(offsetof(struct batadv_icmp_packet, dst) != 4); + BUILD_BUG_ON(offsetof(struct batadv_icmp_packet_rr, dst) != 4); /* broadcast packet */ batadv_rx_handler[BATADV_BCAST] = batadv_recv_bcast_packet; |