dnsmasq: Fix aliasing violations
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
index c4fda28..e4c2ff9 100755
--- a/src/dnsmasq.h
+++ b/src/dnsmasq.h
@@ -564,7 +564,10 @@
u16 secs, flags;
struct in_addr ciaddr, yiaddr, siaddr, giaddr;
u8 chaddr[DHCP_CHADDR_MAX], sname[64], file[128];
+ union {
u8 options[312];
+ u32 options32[312/4];
+ };
};
struct ping_result {
diff --git a/src/rfc2131.c b/src/rfc2131.c
index 1ef8569..6226c32 100755
--- a/src/rfc2131.c
+++ b/src/rfc2131.c
@@ -167,7 +167,7 @@
mess_type = option_uint(opt, 0, 1);
/* only insist on a cookie for DHCP. */
- if (*((u32 *)&mess->options) != htonl(DHCP_COOKIE))
+ if (*mess->options32 != htonl(DHCP_COOKIE))
return 0;
/* two things to note here: expand_buf may move the packet,