diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2012-05-04 20:52:18 +0200 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2013-07-25 04:49:01 +0530 |
commit | 059965d750de815358fc450989481410b5071d64 (patch) | |
tree | 936dec12e1eb5f50966ea3e4876b44324d579aae | |
parent | 41d356427a632f5336384bfa45c8420ffc274f66 (diff) | |
download | dnsmasq-linaro_android_4.3.1.tar.gz |
dnsmasq: Fix aliasing violationslinaro_android_4.4.4linaro_android_4.4.3linaro_android_4.4.2linaro_android_4.4linaro_android_4.3.1linaro_android_4.3
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rwxr-xr-x | src/dnsmasq.h | 3 | ||||
-rwxr-xr-x | src/rfc2131.c | 2 |
2 files changed, 4 insertions, 1 deletions
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 @@ struct dhcp_packet { 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 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index, 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, |