From c845f6eda51bfc7f47a4fa3302847dea0c715c24 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Sat, 21 Sep 2013 14:02:10 +0100 Subject: [PATCH] Fix compiler warnings. --- src/dhcp6.c | 2 ++ src/rfc3315.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dhcp6.c b/src/dhcp6.c index 527d797..9ad8912 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -114,6 +114,8 @@ void dhcp6_packet(time_t now) unsigned short port; struct in6_addr dst_addr; + memset(&dst_addr, 0, sizeof(dst_addr)); + msg.msg_control = control_u.control6; msg.msg_controllen = sizeof(control_u); msg.msg_flags = 0; diff --git a/src/rfc3315.c b/src/rfc3315.c index 05e70ae..ee06353 100644 --- a/src/rfc3315.c +++ b/src/rfc3315.c @@ -577,7 +577,7 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh { int address_assigned = 0; /* tags without all prefix-class tags */ - struct dhcp_netid *solicit_tags = tagif; + struct dhcp_netid *solicit_tags; struct dhcp_context *c; *outmsgtypep = DHCP6ADVERTISE; @@ -593,7 +593,8 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh log6_packet(&state, "DHCPSOLICIT", NULL, ignore ? _("ignored") : NULL); request_no_address: - + solicit_tags = tagif; + if (ignore) return 0;