From ec73b5458cd0dcb6b9f124360e77f4ef523db35e Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Tue, 25 Jan 2000 01:04:21 +0000 Subject: [PATCH] Linux fixups for haddr/htype->hbuf --- common/discover.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/common/discover.c b/common/discover.c index 9848ba6b..fb0f87c5 100644 --- a/common/discover.c +++ b/common/discover.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: discover.c,v 1.18 2000/01/05 18:00:34 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: discover.c,v 1.19 2000/01/25 01:04:21 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -368,50 +368,50 @@ void discover_interfaces (state) #endif case ARPHRD_ETHER: - tmp -> hw_address.hlen = 6; - tmp -> hw_address.htype = ARPHRD_ETHER; - memcpy (tmp -> hw_address.haddr, sa.sa_data, 6); + tmp -> hw_address.hlen = 7; + tmp -> hw_address.hbuf [0] = ARPHRD_ETHER; + memcpy (&tmp -> hw_address.hbuf [1], sa.sa_data, 6); break; #ifndef HAVE_ARPHRD_IEEE802 # define ARPHRD_IEEE802 HTYPE_IEEE802 #endif case ARPHRD_IEEE802: - tmp -> hw_address.hlen = 6; - tmp -> hw_address.htype = ARPHRD_IEEE802; - memcpy (tmp -> hw_address.haddr, sa.sa_data, 6); + tmp -> hw_address.hlen = 7; + tmp -> hw_address.hbuf [0] = ARPHRD_IEEE802; + memcpy (&tmp -> hw_address.hbuf [1], sa.sa_data, 6); break; #ifndef HAVE_ARPHRD_FDDI # define ARPHRD_FDDI HTYPE_FDDI #endif case ARPHRD_FDDI: - tmp -> hw_address.hlen = 16; - tmp -> hw_address.htype = HTYPE_FDDI; /* XXX */ - memcpy (tmp -> hw_address.haddr, sa.sa_data, 16); + tmp -> hw_address.hlen = 17; + tmp -> hw_address.hbuf [0] = HTYPE_FDDI; /* XXX */ + memcpy (&tmp -> hw_address.hbuf [1], sa.sa_data, 16); break; #ifdef HAVE_ARPHRD_METRICOM case ARPHRD_METRICOM: - tmp -> hw_address.hlen = 6; - tmp -> hw_address.htype = ARPHRD_METRICOM; - memcpy (tmp -> hw_address.haddr, sa.sa_data, 6); + tmp -> hw_address.hlen = 7; + tmp -> hw_address.hbuf [0] = ARPHRD_METRICOM; + memcpy (&tmp -> hw_address.hbuf [0], sa.sa_data, 6); break; #endif #ifdef HAVE_ARPHRD_AX25 case ARPHRD_AX25: - tmp -> hw_address.hlen = 6; - tmp -> hw_address.htype = ARPHRD_AX25; - memcpy (tmp -> hw_address.haddr, sa.sa_data, 6); + tmp -> hw_address.hlen = 7; + tmp -> hw_address.hbuf [0] = ARPHRD_AX25; + memcpy (&tmp -> hw_address.hbuf [1], sa.sa_data, 6); break; #endif #ifdef HAVE_ARPHRD_NETROM case ARPHRD_NETROM: - tmp -> hw_address.hlen = 6; - tmp -> hw_address.htype = ARPHRD_NETROM; - memcpy (tmp -> hw_address.haddr, sa.sa_data, 6); + tmp -> hw_address.hlen = 7; + tmp -> hw_address.hbuf [0] = ARPHRD_NETROM; + memcpy (&tmp -> hw_address.hbuf [1], sa.sa_data, 6); break; #endif