diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2012-05-04 20:52:18 +0200 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-06-11 23:27:12 +0100 |
commit | 8213dff898cef27642b6eaa75eab079cb08eff1b (patch) | |
tree | 821d297e95221ed5a2f783a7c84967f2d9291f93 | |
parent | 40c4af48e5a4d1578d45f86fb168f4d0c400ea72 (diff) | |
download | android_external_dnsmasq-ics.tar.gz android_external_dnsmasq-ics.tar.bz2 android_external_dnsmasq-ics.zip |
dnsmasq: Fix aliasing violationsics-releaseicscm-9.1.0
Change-Id: I10497b181629b1abe3f8469d8e30c47e7fe0bd13
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 e2dedc6..0eb2ef3 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, |