summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMurray <source@isc.org>2002-06-09 22:17:09 +0000
committerMurray <source@isc.org>2002-06-09 22:17:09 +0000
commit5c1f23c4218533e50edcfb41b00ead3d1b0e9928 (patch)
tree8662ab8b528e88307ef449ff310b7cf91e6d9a67 /common
parentcd6568057eb0236b9bbdbab275d06b3bb71f2dca (diff)
downloadisc-dhcp-5c1f23c4218533e50edcfb41b00ead3d1b0e9928.tar.gz
Properly initialize sockaddr
Submitted by: Jun-ichiro itojun Hagino <itojun@iijlab.net> RT #: 3040
Diffstat (limited to 'common')
-rw-r--r--common/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/socket.c b/common/socket.c
index 16f048eb..0a8be2d2 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -51,7 +51,7 @@
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.55 2000/09/30 01:24:55 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.56 2002/06/09 22:17:09 murray Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -114,11 +114,11 @@ int if_register_socket (info)
once = 1;
#endif
+ memset (&name, 0, sizeof (name));
/* Set up the address we're going to bind to. */
name.sin_family = AF_INET;
name.sin_port = local_port;
name.sin_addr = local_address;
- memset (name.sin_zero, 0, sizeof (name.sin_zero));
/* Make a socket... */
if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)