Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/dist/dhcp/common Pull up revision 1.2 (requested by ito...



details:   https://anonhg.NetBSD.org/src/rev/8b5d5cbb8fe2
branches:  netbsd-1-6
changeset: 527710:8b5d5cbb8fe2
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue Jun 04 11:52:48 2002 +0000

description:
Pull up revision 1.2 (requested by itojun in ticket #142):
missing initialization of sockaddr.  from deraadt

diffstat:

 dist/dhcp/common/icmp.c   |  3 ++-
 dist/dhcp/common/socket.c |  4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 961f87aaf1ed -r 8b5d5cbb8fe2 dist/dhcp/common/icmp.c
--- a/dist/dhcp/common/icmp.c   Tue Jun 04 11:43:49 2002 +0000
+++ b/dist/dhcp/common/icmp.c   Tue Jun 04 11:52:48 2002 +0000
@@ -44,7 +44,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: icmp.c,v 1.1.1.1 2001/08/03 11:35:32 drochner Exp $ Copyright (c) 1996-2001 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: icmp.c,v 1.1.1.1.4.1 2002/06/04 11:52:48 lukem Exp $ Copyright (c) 1996-2001 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -163,6 +163,7 @@
        if (!icmp_state)
                log_fatal ("ICMP protocol used before initialization.");
 
+       memset(&to, 0, sizeof(to));
 #ifdef HAVE_SA_LEN
        to.sin_len = sizeof to;
 #endif
diff -r 961f87aaf1ed -r 8b5d5cbb8fe2 dist/dhcp/common/socket.c
--- a/dist/dhcp/common/socket.c Tue Jun 04 11:43:49 2002 +0000
+++ b/dist/dhcp/common/socket.c Tue Jun 04 11:52:48 2002 +0000
@@ -51,7 +51,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: socket.c,v 1.1.1.1 2001/08/03 11:35:33 drochner Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: socket.c,v 1.1.1.1.4.1 2002/06/04 11:52:57 lukem Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -115,10 +115,10 @@
 #endif
 
        /* 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 = local_address;
-       memset (name.sin_zero, 0, sizeof (name.sin_zero));
 
        /* Make a socket... */
        if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)



Home | Main Index | Thread Index | Old Index