Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/dhcp/common Patchlevel 20 fixes



details:   https://anonhg.NetBSD.org/src/rev/307987ec96fa
branches:  trunk
changeset: 467825:307987ec96fa
user:      mellon <mellon%NetBSD.org@localhost>
date:      Tue Mar 30 00:10:08 1999 +0000

description:
Patchlevel 20 fixes

diffstat:

 usr.sbin/dhcp/common/icmp.c    |   4 +---
 usr.sbin/dhcp/common/inet.c    |   2 +-
 usr.sbin/dhcp/common/options.c |  10 +++++-----
 3 files changed, 7 insertions(+), 9 deletions(-)

diffs (74 lines):

diff -r 119b2ee667eb -r 307987ec96fa usr.sbin/dhcp/common/icmp.c
--- a/usr.sbin/dhcp/common/icmp.c       Mon Mar 29 23:08:21 1999 +0000
+++ b/usr.sbin/dhcp/common/icmp.c       Tue Mar 30 00:10:08 1999 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: icmp.c,v 1.1.1.5 1999/02/18 21:48:50 mellon Exp $ Copyright (c) 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: icmp.c,v 1.1.1.6 1999/03/30 00:10:08 mellon Exp $ Copyright (c) 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -61,8 +61,6 @@
 {
        struct protoent *proto;
        int protocol = 1;
-       struct sockaddr_in from;
-       int fd;
        int state;
 
        /* Only initialize icmp once. */
diff -r 119b2ee667eb -r 307987ec96fa usr.sbin/dhcp/common/inet.c
--- a/usr.sbin/dhcp/common/inet.c       Mon Mar 29 23:08:21 1999 +0000
+++ b/usr.sbin/dhcp/common/inet.c       Tue Mar 30 00:10:08 1999 +0000
@@ -114,7 +114,7 @@
        struct iaddr subnet;
        struct iaddr mask;
 {
-       int i, j, k;
+       int i;
        struct iaddr rv;
 
        if (subnet.len != mask.len) {
diff -r 119b2ee667eb -r 307987ec96fa usr.sbin/dhcp/common/options.c
--- a/usr.sbin/dhcp/common/options.c    Mon Mar 29 23:08:21 1999 +0000
+++ b/usr.sbin/dhcp/common/options.c    Tue Mar 30 00:10:08 1999 +0000
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: options.c,v 1.1.1.7 1999/03/29 23:00:52 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: options.c,v 1.1.1.8 1999/03/30 00:10:09 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #define DHCP_OPTION_DATA
@@ -135,7 +135,7 @@
                           for clients, but what the heck... */
                        t = ((unsigned char *)
                             dmalloc (len + packet -> options [code].len + 1,
-                                     "parse_option_buffer");
+                                     "parse_option_buffer"));
                        if (!t)
                                error ("Can't expand storage for option %s.",
                                       dhcp_options [code].name);
@@ -605,6 +605,7 @@
        struct hardware *hfrom;
 {
        struct packet tp;
+       int i;
 
        if (packet -> hlen > sizeof packet -> chaddr) {
                note ("Discarding packet with invalid hlen.");
@@ -631,9 +632,8 @@
 
        /* Free the data associated with the options. */
        for (i = 0; i < 256; i++) {
-               if (packet -> options [i].len &&
-                   packet -> options [i].data)
-                       dfree (packet -> options [i].data, "do_packet");
+               if (tp.options [i].len && tp.options [i].data)
+                       dfree (tp.options [i].data, "do_packet");
        }
 }
 



Home | Main Index | Thread Index | Old Index