diff options
Diffstat (limited to 'contrib/isc-dhcp/common/parse.c')
-rw-r--r-- | contrib/isc-dhcp/common/parse.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/isc-dhcp/common/parse.c b/contrib/isc-dhcp/common/parse.c index 97bfa87..d750ec5 100644 --- a/contrib/isc-dhcp/common/parse.c +++ b/contrib/isc-dhcp/common/parse.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.2.2.1 1998/06/25 21:11:31 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.2.2.3 1998/12/22 22:43:22 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -222,6 +222,9 @@ void parse_hardware_param (cfile, hardware) case TOKEN_RING: hardware -> htype = HTYPE_IEEE802; break; + case FDDI: + hardware -> htype = HTYPE_FDDI; + break; default: parse_warn ("expecting a network hardware type"); skip_to_semi (cfile); @@ -247,6 +250,9 @@ void parse_hardware_param (cfile, hardware) hardware -> hlen = hlen; memcpy ((unsigned char *)&hardware -> haddr [0], t, hardware -> hlen); + if (hlen < sizeof hardware -> haddr) + memset (&hardware -> haddr [hlen], 0, + (sizeof hardware -> haddr) - hlen); free (t); } |