]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
proxyarp: Fix DHCP and ND message structures
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 25 Nov 2014 23:05:24 +0000 (01:05 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 25 Nov 2014 23:09:54 +0000 (01:09 +0200)
These need to be marked packed to avoid issues with compilers
potentially adding padding between the fields (e.g., gcc on 64-bit
seemed to make struct icmpv6_ndmsg two octets too long which broke IPv6
address discovery).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/dhcp_snoop.c
src/ap/ndisc_snoop.c

index 703a59960a875a4f7ccae23a7a49f24f911c0414..c5e37fb4fb0ff830b7860e85757d9cf0a496f8d2 100644 (file)
@@ -36,7 +36,7 @@ struct bootp_pkt {
        u8 serv_name[64];
        u8 boot_file[128];
        u8 exten[312];
-};
+} STRUCT_PACKED;
 
 #define DHCPACK        5
 static const u8 ic_bootp_cookie[] = { 99, 130, 83, 99 };
index b29cc70ed4e4288a65f886e1f7a6e350cffd4493..755621c565c044053240212c01cc3bc45ab3354e 100644 (file)
@@ -30,7 +30,7 @@ struct icmpv6_ndmsg {
        u8 opt_type;
        u8 len;
        u8 opt_lladdr[0];
-};
+} STRUCT_PACKED;
 
 #define ROUTER_ADVERTISEMENT   134
 #define NEIGHBOR_SOLICITATION  135