summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-05-04 20:52:18 +0200
committerAmit Pundir <amit.pundir@linaro.org>2013-07-25 04:49:01 +0530
commit059965d750de815358fc450989481410b5071d64 (patch)
tree936dec12e1eb5f50966ea3e4876b44324d579aae
parent41d356427a632f5336384bfa45c8420ffc274f66 (diff)
downloaddnsmasq-linaro_android_4.4.4.tar.gz
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rwxr-xr-xsrc/dnsmasq.h3
-rwxr-xr-xsrc/rfc2131.c2
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,