summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/dhcp')
-rw-r--r--usr.sbin/dhcp/common/icmp.c1
-rw-r--r--usr.sbin/dhcp/common/socket.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/dhcp/common/icmp.c b/usr.sbin/dhcp/common/icmp.c
index d64aef0ab44..c554e80c8d9 100644
--- a/usr.sbin/dhcp/common/icmp.c
+++ b/usr.sbin/dhcp/common/icmp.c
@@ -94,6 +94,7 @@ int icmp_echorequest (addr)
if (!icmp_protocol_initialized)
error ("attempt to use ICMP protocol before initialization.");
+ memset(&to, 0, sizeof to);
to.sin_len = sizeof to;
to.sin_family = AF_INET;
to.sin_port = 0; /* unused. */
diff --git a/usr.sbin/dhcp/common/socket.c b/usr.sbin/dhcp/common/socket.c
index a064e2f968b..01bb5dd1737 100644
--- a/usr.sbin/dhcp/common/socket.c
+++ b/usr.sbin/dhcp/common/socket.c
@@ -51,6 +51,7 @@ int if_register_socket (info)
int flag;
/* Set up the address we're going to bind to. */
+ memset(&name, 0, sizeof name);
name.sin_family = AF_INET;
name.sin_port = local_port;
name.sin_addr.s_addr = INADDR_ANY;