Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 1999 12:07:08 -0400 (EDT)
From:      mtaylor@cybernet.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/11525: [PATCH] Networking patches to increase # interfaces in SIOCGIFCONF calls
Message-ID:  <199905051607.MAA03078@spiffy.cybernet.com>

next in thread | raw e-mail | index | archive | help

>Number:         11525
>Category:       misc
>Synopsis:       [PATCH] Networking patches to increase # interfaces in SIOCGIFCONF calls
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May  5 14:00:03 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Mark J. Taylor
>Release:        FreeBSD 3.1-RELEASE i386
>Organization:
Cybernet Systems
>Environment:


>Description:

FreeBSD has many user-level programs that don't allow enough buffer space
when doing a SIOCGIFCONF ioctl.  These patches address this by increasing
these programs buffer space to enough to handle 192 interfaces.
There are also a few other, miscellaneous, patches included here.  They
are well documented in the "Fix" section.

>How-To-Repeat:

Add 16 slip interfaces, 16 tun interfaces, and 16 ppp interfaces to your
kernel.  Now try to get things like "portmap" to work correctly, consistently.
We were seeing things like "portmap" not getting ANY local IP addresses, so
RPC services were not working.

>Fix:
	

Here's patches, relative to 3.1-RELEASE, that correct some networking
problems.


1)
Patches to many user-level programs to support more interfaces when
performing SIOCGIFCONF call.  Some code only supported 8 interfaces!
Now they all support 192 interfaces: this is only 192*32 bytes of
data (6144 bytes).  192 is a lot of interfaces, maybe you'll want to
limit that to something less, like 96 (3072 bytes).  I don't recommend
less than 96 interfaces (think: MULTIPORT serial!).  After all, sendmail
uses enough space for 512 interfaces!

2)
The SIOCGIFxxx calls use a struct ifreq (see /sys/net/if.h).  It is a
union.  Too much code does, bogusly, a "SIOCGIFFLAGS" on an ifreq struct,
followed by a "SIOCGIFNETMASK" (or similar).  Well, the IFFLAGS ioctl
tends to trounce the ifreq structure: it is a union, after all.
contrib/libpcap/inet.c even has a work-around for it, if you're running
Linux.  :)


Other significant patches:
sys/dev/ccd/ccd.c:
  There is a signed-long problem.  It caused some funky math in some
  case (I can't remember exactly).  It came up in 2.2.7.

sys/dev/dpt/dpt_control.c
  There is a page-boundary wrapping problem when mapping the BIOS area.
  It is really an "off by one" error kind of thing.  I fixed it by mapping
  an extra page in, always, and unmapping an extra page, always.

sys/net/if.c:
  If the sa_len field of the return value of an ifreq structure is
  *going* to be zero, then don't report it.  There are several, bogus,
  user-level code that does things like "pointer += pointer.xxx.sa_len + 
  IFNAMSIZE", or something equally bogus.  Most (if not all) of these
  are in non-FreeBSD source code.  See contrib/bind/bin/named/ns_main.c
  for a "#ifdef FIX_ZERO_SA_LEN" macro.

sys/i386/isa/psm.c:
  Always report the number of buttons.  Why not?  And tt reduces the
  amount of string space used by the kernel!

usr.sbin/portmap/:
  I added a "HUP" handler to the portmapper.  It will re-get the local IP
  addresses.  You don't want to reboot when you change you IP addresses,
  do you?



All of these patches are in our NetMAX BLD475 release, which is based on
FreeBSD 2.2.7 (with most of the 2.2.8 kernel integrated in).





src/contrib/amd/libamu/wire.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 32 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/contrib/bind/bin/named/ns_main.c
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/contrib/libpcap/inet.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 16 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/lib/libc/rpc/get_myaddress.c
Increased number of interfaces handled by SIOCGIFCONF ioctl to 192.


src/lib/libc/rpc/pmap_rmt.c
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/libexec/bootpd/getether.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 16 to 192.


src/libexec/bootpd/getif.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 10 to 192.


src/libexec/rbootd/bpf.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 8 to 192.


src/release/sysinstall/sysinstall.h
Increased number of interfaces handled by SIOCGIFCONF ioctl from 50 to 192.


src/sbin/i386/cxconfig/cxconfig.c
Increased number of interfaces handled by SIOCGIFCONF ioctl to 192.


src/sys/dev/ccd/ccd.c
Fixed signed long consistency.


src/sys/dev/dpt/dpt_control.c
Fixed page-boundary wrapping problem when accessing BIOS data pointers.
Corrected a missed splx() on error exit in dpt_get_sysinfo.


src/sys/i386/i386/userconfig.c
Added Lucent WaveLAN (wl) device in visual userconfig.


src/sys/i386/isa/aic_98.h
Corrected typeos in macros.


src/sys/i386/isa/psm.c
Always report number of buttons on pointing device.


src/sys/net/if.c
Skip sa_len == 0 ifreq stuctures when reporting via SIOCGIFCONF.


src/usr.sbin/arp/arp.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 32 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/mrouted/config.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 32 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/mrouted/mtrace.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 32 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/natd/natd.c
NOTE: natd has moved into /sbin.
Increased number of interfaces handled by SIOCGIFCONF ioctl from 32 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/portmap/from_local.c
Make "num_local" non-static.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/portmap/portmap.c
Added HUP signal handler to re-get the IP address list.


src/usr.sbin/pppd/sys-bsd.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 32 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/rarpd/rarpd.c
Increased number of interfaces handled by SIOCGIFCONF ioctl from 16 to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/timed/timed/timed.c
Increased number of interfaces handled by SIOCGIFCONF ioctl to 192.
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).


src/usr.sbin/xntpd/xntpd/ntp_io.c
Set sa_family to AF_INET before SIOCGIFxxx calls (SIOCGIFxxx trounces struct).






Index: src/contrib/amd/libamu/wire.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/contrib/amd/libamu/wire.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/contrib/amd/libamu/wire.c	1999/03/15 19:08:57	1.1.1.1
--- src/contrib/amd/libamu/wire.c	1999/04/29 21:29:50	1.2
***************
*** 84,92 ****
  # define SIZE(ifr)	sizeof(struct ifreq)
  #endif /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_
STRUCT_SOCKADDR_SA_LEN) */
  
  #define C(x)		((x) & 0xff)
! #define GFBUFLEN	1024
  #define clist		(ifc.ifc_ifcu.ifcu_req)
  #define count		(ifc.ifc_len/sizeof(struct ifreq))
  
  
--- 84,92 ----
  # define SIZE(ifr)	sizeof(struct ifreq)
  #endif /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_
STRUCT_SOCKADDR_SA_LEN) */
  
  #define C(x)		((x) & 0xff)
! #define GFBUFLEN	(192*sizeof(struct ifreq))
  #define clist		(ifc.ifc_ifcu.ifcu_req)
  #define count		(ifc.ifc_len/sizeof(struct ifreq))
  
  
***************
*** 227,234 ****
--- 227,235 ----
  
      /*
       * Get the netmask of this interface
       */
+     ifr->ifr_addr.sa_family = AF_INET;
      if (ioctl(fd, SIOCGIFNETMASK, (caddr_t) ifr) < 0)
        continue;
  
      netmask = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr;
Index: src/contrib/bind/bin/named/ns_main.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/contrib/bind/bin/named/ns_main.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/contrib/bind/bin/named/ns_main.c	1999/03/15 19:09:15	1.1.1.1
--- src/contrib/bind/bin/named/ns_main.c	1999/04/29 22:09:51	1.2
***************
*** 1053,1060 ****
--- 1053,1061 ----
  #elif defined SIOCGIFCONF_ADDR
  		cpsize = sizeof ifreq;
  #else
  		cpsize = sizeof ifreq.ifr_name;
+ 		ifreq.ifr_addr.sa_family = AF_INET;
  		if (ioctl(s, SIOCGIFADDR, (char *)&ifreq) < 0) {
  			ns_notice(ns_log_default,
  				  "get interface addr (%s): %s",
  				  ifreq.ifr_name, strerror(errno));
***************
*** 1162,1169 ****
--- 1163,1171 ----
  			 * The local network for a PPP link is just the
  			 * two ends of the link, so for each endpoint we
  			 * add a pattern that will only match the endpoint.
  			 */
+ 			ifreq.ifr_addr.sa_family = AF_INET;
  			if (ioctl(s, SIOCGIFDSTADDR, (char *)&ifreq) < 0) {
  				ns_notice(ns_log_default, "get dst addr: %s",
  					  strerror(errno));
  				continue;
***************
*** 1199,1206 ****
--- 1201,1209 ----
  			 * list of local networks.
  			 */
  
  #ifdef SIOCGIFNETMASK	/* XXX */
+ 			ifreq.ifr_addr.sa_family = AF_INET;
  			if (ioctl(s, SIOCGIFNETMASK, (char *)&ifreq) < 0) {
  				ns_notice(ns_log_default, "get netmask: %s",
  					  strerror(errno));
  				continue;
Index: src/contrib/libpcap/inet.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/contrib/libpcap/inet.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -c -4 -r1.1.1.1 -r1.3
*** src/contrib/libpcap/inet.c	1999/03/15 19:12:37	1.1.1.1
--- src/contrib/libpcap/inet.c	1999/05/04 02:28:21	1.3
***************
*** 88,96 ****
  	register int fd, minunit, n;
  	register char *cp;
  	register struct ifreq *ifrp, *ifend, *ifnext, *mp;
  	struct ifconf ifc;
! 	struct ifreq ibuf[16], ifr;
  	static char device[sizeof(ifrp->ifr_name) + 1];
  
  	fd = socket(AF_INET, SOCK_DGRAM, 0);
  	if (fd < 0) {
--- 88,96 ----
  	register int fd, minunit, n;
  	register char *cp;
  	register struct ifreq *ifrp, *ifend, *ifnext, *mp;
  	struct ifconf ifc;
! 	struct ifreq ibuf[192], ifr;
  	static char device[sizeof(ifrp->ifr_name) + 1];
  
  	fd = socket(AF_INET, SOCK_DGRAM, 0);
  	if (fd < 0) {
***************
*** 179,190 ****
  		(void)sprintf(errbuf, "socket: %s", pcap_strerror(errno));
  		return (-1);
  	}
  	memset(&ifr, 0, sizeof(ifr));
- #ifdef linux
- 	/* XXX Work around Linux kernel bug */
  	ifr.ifr_addr.sa_family = AF_INET;
- #endif
  	(void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
  	if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) < 0) {
  		(void)sprintf(errbuf, "SIOCGIFADDR: %s: %s",
  		    device, pcap_strerror(errno));
--- 179,187 ----
Index: src/lib/libc/rpc/get_myaddress.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/lib/libc/rpc/get_myaddress.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/lib/libc/rpc/get_myaddress.c	1999/03/15 19:17:31	1.1.1.1
--- src/lib/libc/rpc/get_myaddress.c	1999/04/29 22:18:08	1.2
***************
*** 61,69 ****
  get_myaddress(addr)
  	struct sockaddr_in *addr;
  {
  	int s;
! 	char buf[BUFSIZ];
  	struct ifconf ifc;
  	struct ifreq ifreq, *ifr, *end;
  	int loopback = 0, gotit = 0;
  
--- 61,69 ----
  get_myaddress(addr)
  	struct sockaddr_in *addr;
  {
  	int s;
! 	char buf[192*sizeof(struct ifreq)];
  	struct ifconf ifc;
  	struct ifreq ifreq, *ifr, *end;
  	int loopback = 0, gotit = 0;
  
Index: src/lib/libc/rpc/pmap_rmt.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/lib/libc/rpc/pmap_rmt.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/lib/libc/rpc/pmap_rmt.c	1999/03/15 19:17:31	1.1.1.1
--- src/lib/libc/rpc/pmap_rmt.c	1999/04/29 22:18:54	1.2
***************
*** 197,204 ****
--- 197,205 ----
                  if ((ifreq.ifr_flags & IFF_BROADCAST) &&
  		    (ifreq.ifr_flags & IFF_UP)) {
  			sin = (struct sockaddr_in *)&ifr->ifr_addr;
  #ifdef SIOCGIFBRDADDR   /* 4.3BSD */
+ 			ifreq.ifr_addr.sa_family = AF_INET;
  			if (ioctl(sock, SIOCGIFBRDADDR, (char *)&ifreq) < 0) {
  				addr =
  				    inet_makeaddr(inet_netof(sin->sin_addr),
  				    INADDR_ANY);
Index: src/libexec/bootpd/getether.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/libexec/bootpd/getether.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/libexec/bootpd/getether.c	1999/03/15 19:18:34	1.1.1.1
--- src/libexec/bootpd/getether.c	1999/04/29 22:20:56	1.2
***************
*** 121,129 ****
  	char *eap;					/* Ether address (output) */
  {
  	int fd, rc = -1;
  	register int n;
! 	struct ifreq ibuf[16], ifr;
  	struct ifconf ifc;
  	register struct ifreq *ifrp, *ifend;
  
  	/* Fetch the interface configuration */
--- 121,129 ----
  	char *eap;					/* Ether address (output) */
  {
  	int fd, rc = -1;
  	register int n;
! 	struct ifreq ibuf[192], ifr;
  	struct ifconf ifc;
  	register struct ifreq *ifrp, *ifend;
  
  	/* Fetch the interface configuration */
Index: src/libexec/bootpd/getif.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/libexec/bootpd/getif.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/libexec/bootpd/getif.c	1999/03/15 19:18:34	1.1.1.1
--- src/libexec/bootpd/getif.c	1999/04/29 22:22:07	1.2
***************
*** 32,40 ****
  #ifdef	__bsdi__
  #define BSD 43
  #endif
  
! static struct ifreq ifreq[10];	/* Holds interface configuration */
  static struct ifconf ifconf;	/* points to ifreq */
  
  static int nmatch();
  
--- 32,40 ----
  #ifdef	__bsdi__
  #define BSD 43
  #endif
  
! static struct ifreq ifreq[192];	/* Holds interface configuration */
  static struct ifconf ifconf;	/* points to ifreq */
  
  static int nmatch();
  
Index: src/libexec/rbootd/bpf.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/libexec/rbootd/bpf.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/libexec/rbootd/bpf.c	1999/03/15 19:18:37	1.1.1.1
--- src/libexec/rbootd/bpf.c	1999/04/29 22:22:55	1.2
***************
*** 219,227 ****
  char *
  BpfGetIntfName(errmsg)
  	char **errmsg;
  {
! 	struct ifreq ibuf[8], *ifrp, *ifend, *mp;
  	struct ifconf ifc;
  	int fd;
  	int minunit, n;
  	char *cp;
--- 219,227 ----
  char *
  BpfGetIntfName(errmsg)
  	char **errmsg;
  {
! 	struct ifreq ibuf[192], *ifrp, *ifend, *mp;
  	struct ifconf ifc;
  	int fd;
  	int minunit, n;
  	char *cp;
Index: src/release/sysinstall/sysinstall.h
===================================================================
RCS file: /var/CVS/FreeBSD31/src/release/sysinstall/sysinstall.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/release/sysinstall/sysinstall.h	1999/03/15 19:19:13	1.1.1.1
--- src/release/sysinstall/sysinstall.h	1999/04/29 22:24:01	1.2
***************
*** 56,64 ****
  
  /* device limits */
  #define DEV_NAME_MAX		64	/* The maximum length of a device name	*/
  #define DEV_MAX			100	/* The maximum number of devices we'll deal with */
! #define INTERFACE_MAX		50	/* Maximum number of network interfaces we'll deal w
ith */
  #define IO_ERROR		-2	/* Status code for I/O error rather than normal EOF */
  
  /* Number of seconds to wait for data to come off even the slowest media */
  #define MEDIA_TIMEOUT		300
--- 56,64 ----
  
  /* device limits */
  #define DEV_NAME_MAX		64	/* The maximum length of a device name	*/
  #define DEV_MAX			100	/* The maximum number of devices we'll deal with */
! #define INTERFACE_MAX		192	/* Maximum number of network interfaces we'll deal 
with */
  #define IO_ERROR		-2	/* Status code for I/O error rather than normal EOF */
  
  /* Number of seconds to wait for data to come off even the slowest media */
  #define MEDIA_TIMEOUT		300
Index: src/sbin/i386/cxconfig/cxconfig.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/sbin/i386/cxconfig/cxconfig.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/sbin/i386/cxconfig/cxconfig.c	1999/03/15 19:19:29	1.1.1.1
--- src/sbin/i386/cxconfig/cxconfig.c	1999/04/29 22:25:09	1.2
***************
*** 400,408 ****
  void printall ()
  {
  	struct ifconf ifc;
  	struct ifreq *ifr;
! 	char buf[BUFSIZ], *cp;
  	int s, c;
  
  	s = socket (AF_INET, SOCK_DGRAM, 0);
  	if (s < 0)
--- 400,408 ----
  void printall ()
  {
  	struct ifconf ifc;
  	struct ifreq *ifr;
! 	char buf[192*sizeof(struf ifreq)], *cp;
  	int s, c;
  
  	s = socket (AF_INET, SOCK_DGRAM, 0);
  	if (s < 0)
Index: src/sys/dev/ccd/ccd.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/sys/dev/ccd/ccd.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/sys/dev/ccd/ccd.c	1999/03/15 19:22:09	1.1.1.1
--- src/sys/dev/ccd/ccd.c	1999/04/29 18:50:52	1.2
***************
*** 196,204 ****
  static	void ccdintr __P((struct ccd_softc *, struct buf *));
  static	int ccdinit __P((struct ccddevice *, char **, struct proc *));
  static	int ccdlookup __P((char *, struct proc *p, struct vnode **));
  static	void ccdbuffer __P((struct ccdbuf **ret, struct ccd_softc *,
! 		struct buf *, daddr_t, caddr_t, long));
  static	void ccdgetdisklabel __P((dev_t));
  static	void ccdmakedisklabel __P((struct ccd_softc *));
  static	int ccdlock __P((struct ccd_softc *));
  static	void ccdunlock __P((struct ccd_softc *));
--- 196,204 ----
  static	void ccdintr __P((struct ccd_softc *, struct buf *));
  static	int ccdinit __P((struct ccddevice *, char **, struct proc *));
  static	int ccdlookup __P((char *, struct proc *p, struct vnode **));
  static	void ccdbuffer __P((struct ccdbuf **ret, struct ccd_softc *,
! 		struct buf *, daddr_t, caddr_t, u_long));
  static	void ccdgetdisklabel __P((dev_t));
  static	void ccdmakedisklabel __P((struct ccd_softc *));
  static	int ccdlock __P((struct ccd_softc *));
  static	void ccdunlock __P((struct ccd_softc *));
***************
*** 763,771 ****
  ccdstart(cs, bp)
  	register struct ccd_softc *cs;
  	register struct buf *bp;
  {
! 	register long bcount, rcount;
  	struct ccdbuf *cbp[4];
  	/* XXX! : 2 reads and 2 writes for RAID 4/5 */
  	caddr_t addr;
  	daddr_t bn;
--- 763,771 ----
  ccdstart(cs, bp)
  	register struct ccd_softc *cs;
  	register struct buf *bp;
  {
! 	register u_long bcount, rcount;
  	struct ccdbuf *cbp[4];
  	/* XXX! : 2 reads and 2 writes for RAID 4/5 */
  	caddr_t addr;
  	daddr_t bn;
***************
*** 818,830 ****
  	register struct ccd_softc *cs;
  	struct buf *bp;
  	daddr_t bn;
  	caddr_t addr;
! 	long bcount;
  {
  	register struct ccdcinfo *ci, *ci2 = NULL;	/* XXX */
  	register struct ccdbuf *cbp;
  	register daddr_t cbn, cboff;
--- 818,831 ----
  	register struct ccd_softc *cs;
  	struct buf *bp;
  	daddr_t bn;
  	caddr_t addr;
! 	u_long bcount;
  {
  	register struct ccdcinfo *ci, *ci2 = NULL;	/* XXX */
  	register struct ccdbuf *cbp;
  	register daddr_t cbn, cboff;
Index: src/sys/dev/dpt/dpt_control.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/sys/dev/dpt/dpt_control.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/sys/dev/dpt/dpt_control.c	1999/03/15 19:22:11	1.1.1.1
--- src/sys/dev/dpt/dpt_control.c	1999/04/29 18:55:15	1.2
***************
*** 141,148 ****
--- 141,149 ----
  	u_int32_t       offset;
  
  
  
+ 	req_size += PAGE_SIZE;
  	size = (req_size / PAGE_SIZE + 1) * PAGE_SIZE;
  	paddr = req_paddr & 0xfffff000;
  	offset = req_paddr - paddr;
  
***************
*** 160,168 ****
  
  
  /*
   * Release virtual space allocated by physmap We ASSUME that the correct
!  * srart address and the correct LENGTH are given.
   * 
   * Disaster will follow if these assumptions are false!
   */
  
--- 161,169 ----
  
  
  /*
   * Release virtual space allocated by physmap We ASSUME that the correct
!  * start address and the correct LENGTH are given.
   * 
   * Disaster will follow if these assumptions are false!
   */
  
***************
*** 170,177 ****
--- 171,179 ----
  dpt_unphysmap(u_int8_t * vaddr, vm_size_t size)
  {
  	int             ndx;
  
+ 	size += PAGE_SIZE;
  	for (ndx = 0; ndx < size; ndx += PAGE_SIZE) {
  		pmap_kremove((vm_offset_t) vaddr + ndx);
  	}
  
***************
*** 242,249 ****
--- 244,252 ----
  
  	/* Get The Number Of Drives From The Bios Data Area */
  	if ((addr = (char *) dpt_physmap(0x0475, 1024)) == NULL) {
  		printf("DPT:  Cannot map BIOS address 0x0475.  No sysinfo... :-(\n");
+ 		splx(ospl);
  		return;
  	}
  	dpt_sysinfo.numDrives = *addr;
  	dpt_unphysmap(addr, 1024);
Index: src/sys/i386/i386/userconfig.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/sys/i386/i386/userconfig.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/sys/i386/i386/userconfig.c	1999/03/15 19:22:59	1.1.1.1
--- src/sys/i386/i386/userconfig.c	1999/04/29 19:13:32	1.2
***************
*** 390,397 ****
--- 390,398 ----
  {"tl",          "Texas Instruments ThunderLAN ethernet adapter", FLG_FIXED, CL
S_NETWORK},
  {"vr",          "VIA Rhine/Rhine II ethernet adapter",	FLG_FIXED,	CLS_NETWORK}
,
  {"wb",          "Winbond W89C840F ethernet adapter",	FLG_FIXED,	CLS_NETWORK},
  {"xl",          "3COM 3C90x PCI ethernet adapter",	FLG_FIXED,	CLS_NETWORK},
+ {"wl",          "Lucent WaveLAN ISA Radio LAN adapter",		0,	CLS_NETWORK},
  
  {"sio",         "8250/16450/16550 Serial port",		0,		CLS_COMMS},
  {"cx",          "Cronyx/Sigma multiport sync/async adapter",0,		CLS_COMMS},
  {"rc",          "RISCom/8 multiport async adapter",	0,		CLS_COMMS},
Index: src/sys/i386/isa/aic_98.h
===================================================================
RCS file: /var/CVS/FreeBSD31/src/sys/i386/isa/aic_98.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/sys/i386/isa/aic_98.h	1999/03/15 19:23:14	1.1.1.1
--- src/sys/i386/isa/aic_98.h	1999/04/29 19:15:13	1.2
***************
*** 61,70 ****
  #define SELID		(iobase + aic->aicport[0x05]) /* Selection/Reselection ID */
  #define SCSIDAT		(iobase + aic->aicport[0x06]) /* SCSI Latched Data */
  #define SCSIBUS		(iobase + aic->aicport[0x07]) /* SCSI Data Bus*/
  #define STCNT0		(iobase + aic->aicport[0x08]) /* SCSI transfer count */
! #define STCNT1		(iobase + aic->aicport[0x09)
! #define STCNT2		(iobase + aic->aicport[0x0a)
  #define CLRSINT0	(iobase + aic->aicport[0x0b]) /* Clear SCSI interrupts 0 */
  #define SSTAT0		(iobase + aic->aicport[0x0b]) /* SCSI interrupt status 0 */
  #define CLRSINT1	(iobase + aic->aicport[0x0c]) /* Clear SCSI interrupts 1 */
  #define SSTAT1		(iobase + aic->aicport[0x0c]) /* SCSI status 1 */
--- 61,70 ----
  #define SELID		(iobase + aic->aicport[0x05]) /* Selection/Reselection ID */
  #define SCSIDAT		(iobase + aic->aicport[0x06]) /* SCSI Latched Data */
  #define SCSIBUS		(iobase + aic->aicport[0x07]) /* SCSI Data Bus*/
  #define STCNT0		(iobase + aic->aicport[0x08]) /* SCSI transfer count */
! #define STCNT1		(iobase + aic->aicport[0x09])
! #define STCNT2		(iobase + aic->aicport[0x0a])
  #define CLRSINT0	(iobase + aic->aicport[0x0b]) /* Clear SCSI interrupts 0 */
  #define SSTAT0		(iobase + aic->aicport[0x0b]) /* SCSI interrupt status 0 */
  #define CLRSINT1	(iobase + aic->aicport[0x0c]) /* Clear SCSI interrupts 1 */
  #define SSTAT1		(iobase + aic->aicport[0x0c]) /* SCSI status 1 */
***************
*** 82,90 ****
  #define DMADATA		(iobase + aic->aicport[0x16]) /* DMA data */
  #define DMADATAL	(iobase + aic->aicport[0x16]) /* DMA data low byte */
  #define DMADATAH	(iobase + aic->aicport[0x17]) /* DMA data high byte */
  #define BRSTCNTRL	(iobase + aic->aicport[0x18]) /* Burst Control */
! #define DMADATALONG	(iobase + aic->aicport[0x18)
  #define PORTA		(iobase + aic->aicport[0x1a]) /* Port A */
  #define PORTB		(iobase + aic->aicport[0x1b]) /* Port B */
  #define REV		(iobase + aic->aicport[0x1c]) /* Revision (001 for 6360) */
  #define STACK		(iobase + aic->aicport[0x1d]) /* Stack */
--- 82,90 ----
  #define DMADATA		(iobase + aic->aicport[0x16]) /* DMA data */
  #define DMADATAL	(iobase + aic->aicport[0x16]) /* DMA data low byte */
  #define DMADATAH	(iobase + aic->aicport[0x17]) /* DMA data high byte */
  #define BRSTCNTRL	(iobase + aic->aicport[0x18]) /* Burst Control */
! #define DMADATALONG	(iobase + aic->aicport[0x18])
  #define PORTA		(iobase + aic->aicport[0x1a]) /* Port A */
  #define PORTB		(iobase + aic->aicport[0x1b]) /* Port B */
  #define REV		(iobase + aic->aicport[0x1c]) /* Revision (001 for 6360) */
  #define STACK		(iobase + aic->aicport[0x1d]) /* Stack */
Index: src/sys/i386/isa/psm.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/sys/i386/isa/psm.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/sys/i386/isa/psm.c	1999/03/15 19:23:26	1.1.1.1
--- src/sys/i386/isa/psm.c	1999/04/29 19:46:25	1.2
***************
*** 1049,1062 ****
      if (verbose)
          printf("psm%d: APM hooks installed.\n", unit);
  #endif /* PSM_HOOKAPM */
  
!     if (!verbose) {
!         printf("psm%d: model %s, device ID %d\n", 
! 	    unit, model_name(sc->hw.model), sc->hw.hwid);
!     } else {
!         printf("psm%d: model %s, device ID %d, %d buttons\n",
! 	    unit, model_name(sc->hw.model), sc->hw.hwid, sc->hw.buttons);
  	printf("psm%d: config:%08x, flags:%08x, packet size:%d\n",
  	    unit, sc->config, sc->flags, sc->mode.packetsize);
  	printf("psm%d: syncmask:%02x, syncbits:%02x\n",
  	    unit, sc->mode.syncmask[0], sc->mode.syncmask[1]);
--- 1049,1059 ----
      if (verbose)
          printf("psm%d: APM hooks installed.\n", unit);
  #endif /* PSM_HOOKAPM */
  
!     printf("psm%d: model %s, device ID %d, %d buttons\n", 
! 	unit, model_name(sc->hw.model), sc->hw.hwid, sc->hw.buttons);
!     if (verbose) {
  	printf("psm%d: config:%08x, flags:%08x, packet size:%d\n",
  	    unit, sc->config, sc->flags, sc->mode.packetsize);
  	printf("psm%d: syncmask:%02x, syncbits:%02x\n",
  	    unit, sc->mode.syncmask[0], sc->mode.syncmask[1]);
Index: src/sys/net/if.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/sys/net/if.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/sys/net/if.c	1999/03/15 19:24:47	1.1.1.1
--- src/sys/net/if.c	1999/04/29 20:35:29	1.2
***************
*** 839,846 ****
--- 839,847 ----
  		} else
  		    for ( ; space > sizeof (ifr) && ifa; 
  			 ifa = ifa->ifa_link.tqe_next) {
  			register struct sockaddr *sa = ifa->ifa_addr;
+ 			if (sa->sa_len == 0) continue;  /* skip "useless" data */
  #ifdef COMPAT_43
  			if (cmd == OSIOCGIFCONF) {
  				struct osockaddr *osa =
  					 (struct osockaddr *)&ifr.ifr_addr;
Index: src/usr.sbin/arp/arp.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/arp/arp.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -c -4 -r1.1.1.1 -r1.3
*** src/usr.sbin/arp/arp.c	1999/03/15 19:28:07	1.1.1.1
--- src/usr.sbin/arp/arp.c	1999/04/29 21:32:05	1.3
***************
*** 618,626 ****
  /*
   * get_ether_addr - get the hardware address of an interface on the
   * the same subnet as ipaddr.
   */
! #define MAX_IFS		32
  
  int
  get_ether_addr(u_long ipaddr, u_char *hwaddr)
  {
--- 618,626 ----
  /*
   * get_ether_addr - get the hardware address of an interface on the
   * the same subnet as ipaddr.
   */
! #define MAX_IFS		192
  
  int
  get_ether_addr(u_long ipaddr, u_char *hwaddr)
  {
***************
*** 669,676 ****
--- 669,677 ----
  			/*
  			 * Get its netmask and check that it's on 
  			 * the right subnet.
  			 */
+ 			ifreq.ifr_addr.sa_family = AF_INET;
  			if (ioctl(s, SIOCGIFNETMASK, &ifreq) < 0)
  				continue;
  			mask = ((struct sockaddr_in *)
  				&ifreq.ifr_addr)->sin_addr.s_addr;
Index: src/usr.sbin/mrouted/config.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/mrouted/config.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/usr.sbin/mrouted/config.c	1999/03/15 19:28:46	1.1.1.1
--- src/usr.sbin/mrouted/config.c	1999/04/29 21:38:53	1.2
***************
*** 32,40 ****
      register vifi_t vifi;
      int n;
      u_int32 addr, mask, subnet;
      short flags;
!     int num_ifreq = 32;
  
      ifc.ifc_len = num_ifreq * sizeof(struct ifreq);
      ifc.ifc_buf = malloc(ifc.ifc_len);
      while (ifc.ifc_buf) {
--- 32,40 ----
      register vifi_t vifi;
      int n;
      u_int32 addr, mask, subnet;
      short flags;
!     int num_ifreq = 192;
  
      ifc.ifc_len = num_ifreq * sizeof(struct ifreq);
      ifc.ifc_buf = malloc(ifc.ifc_len);
      while (ifc.ifc_buf) {
***************
*** 104,111 ****
--- 104,112 ----
  	 * Ignore any interface whose address and mask do not define a
  	 * valid subnet number, or whose address is of the form {subnet,0}
  	 * or {subnet,-1}.
  	 */
+ 	ifr.ifr_addr.sa_family = AF_INET;
  	if (ioctl(udp_socket, SIOCGIFNETMASK, (char *)&ifr) < 0)
  	    log(LOG_ERR, errno, "ioctl SIOCGIFNETMASK for %s", ifr.ifr_name);
  	mask = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr;
  	subnet = addr & mask;
Index: src/usr.sbin/mrouted/mtrace.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/mrouted/mtrace.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/usr.sbin/mrouted/mtrace.c	1999/03/15 19:28:47	1.1.1.1
--- src/usr.sbin/mrouted/mtrace.c	1999/04/29 21:40:54	1.2
***************
*** 911,919 ****
      struct ifreq *ifrp, *ifend;
      u_int32 if_addr, if_mask;
      u_int32 retval = 0xFFFFFFFF;
      int found = FALSE;
!     int num_ifreq = 32;
  
      ifc.ifc_len = num_ifreq * sizeof(struct ifreq);
      ifc.ifc_buf = malloc(ifc.ifc_len);
      while (ifc.ifc_buf) {
--- 911,919 ----
      struct ifreq *ifrp, *ifend;
      u_int32 if_addr, if_mask;
      u_int32 retval = 0xFFFFFFFF;
      int found = FALSE;
!     int num_ifreq = 192;
  
      ifc.ifc_len = num_ifreq * sizeof(struct ifreq);
      ifc.ifc_buf = malloc(ifc.ifc_len);
      while (ifc.ifc_buf) {
***************
*** 973,980 ****
--- 973,981 ----
  				(IFF_MULTICAST|IFF_UP))
  	    continue;
  	if (*dst == 0)
  	    *dst = if_addr;
+ 	ifrp->ifr_addr.sa_family = AF_INET;
  	if (ioctl(s, SIOCGIFNETMASK, (char *)ifrp) >= 0) {
  	    if_mask = ((struct sockaddr_in *)&(ifrp->ifr_addr))->sin_addr.s_addr;
  	    if (if_mask != 0 && (*dst & if_mask) == (if_addr & if_mask)) {
  		retval = if_mask;
Index: src/usr.sbin/natd/natd.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/natd/natd.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -c -4 -r1.1.1.1 -r1.3
*** src/usr.sbin/natd/natd.c	1999/03/15 19:28:53	1.1.1.1
--- src/usr.sbin/natd/natd.c	1999/04/29 21:43:27	1.3
***************
*** 612,620 ****
  
  static void SetAliasAddressFromIfName (char* ifName)
  {
  	struct ifconf		cf;
! 	struct ifreq		buf[32];
  	char			msg[80];
  	struct ifreq*		ifPtr;
  	int			extra;
  	int			helperSock;
--- 612,620 ----
  
  static void SetAliasAddressFromIfName (char* ifName)
  {
  	struct ifconf		cf;
! 	struct ifreq		buf[192];
  	char			msg[80];
  	struct ifreq*		ifPtr;
  	int			extra;
  	int			helperSock;
***************
*** 694,701 ****
--- 694,702 ----
  	ifMTU = req.ifr_mtu;
  /*
   * Get interface address.
   */
+ 	req.ifr_addr.sa_family = AF_INET;
  	if (ioctl (helperSock, SIOCGIFADDR, &req) == -1)
  		Quit ("Cannot get interface address.");
  
  	addr = (struct sockaddr_in*) &req.ifr_addr;
Index: src/usr.sbin/portmap/from_local.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/portmap/from_local.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -c -4 -r1.1.1.1 -r1.3
*** src/usr.sbin/portmap/from_local.c	1999/03/15 19:29:19	1.1.1.1
--- src/usr.sbin/portmap/from_local.c	1999/04/29 21:51:46	1.3
***************
*** 69,77 ****
  
  /* How many interfaces could there be on a computer? */
  
  #define	ESTIMATED_LOCAL 20
! static int num_local = -1;
  static struct in_addr *addrs;
  
  /* find_local - find all IP addresses for this host */
  
--- 69,77 ----
  
  /* How many interfaces could there be on a computer? */
  
  #define	ESTIMATED_LOCAL 20
! int num_local = -1;
  static struct in_addr *addrs;
  
  /* find_local - find all IP addresses for this host */
  
***************
*** 132,140 ****
      /* we only want the first address from each interface */
      if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0)
        perror("SIOCGIFFLAGS");
      else if (ifr.ifr_flags & IFF_UP)    /* active interface */
!       if (ioctl(s, SIOCGIFADDR, &ifr) < 0)
          perror("SIOCGIFADDR");
        else {
          if (alloced < num_local + 1) {
            alloced += ESTIMATED_LOCAL;
--- 132,140 ----
      /* we only want the first address from each interface */
      if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0)
        perror("SIOCGIFFLAGS");
      else if (ifr.ifr_flags & IFF_UP)    /* active interface */
!       if (ifr.ifr_addr.sa_family=AF_INET, ioctl(s, SIOCGIFADDR, &ifr) < 0)
          perror("SIOCGIFADDR");
        else {
          if (alloced < num_local + 1) {
            alloced += ESTIMATED_LOCAL;
Index: src/usr.sbin/portmap/portmap.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/portmap/portmap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/usr.sbin/portmap/portmap.c	1999/03/15 19:29:20	1.1.1.1
--- src/usr.sbin/portmap/portmap.c	1999/04/29 21:51:46	1.2
***************
*** 103,110 ****
--- 103,111 ----
  #include "pmap_check.h"
  
  void reg_service();
  void reap();
+ void hup();
  static void callit();
  static void usage __P((void));
  
  struct pmaplist *pmaplist;
***************
*** 195,202 ****
--- 196,204 ----
  
  	/* additional initializations */
  	check_startup();
  	(void)signal(SIGCHLD, reap);
+ 	(void)signal(SIGHUP, hup);
  	svc_run();
  	syslog(LOG_ERR, "svc_run returned unexpectedly");
  	abort();
  }
***************
*** 610,613 ****
--- 612,626 ----
  	save_errno = errno;
  	while (wait3((int *)NULL, WNOHANG, (struct rusage *)NULL) > 0);
  	errno = save_errno;
  }
+ 
+ void
+ hup()
+ {
+ 	extern int num_local;
+ 
+ 	syslog(LOG_ERR, "caught SIGHUP: reloading");
+ 	/* re-get local IP addresses */
+ 	num_local = -1;
+ }
+ 
Index: src/usr.sbin/pppd/sys-bsd.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/pppd/sys-bsd.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/usr.sbin/pppd/sys-bsd.c	1999/03/15 19:29:32	1.1.1.1
--- src/usr.sbin/pppd/sys-bsd.c	1999/04/29 21:54:24	1.2
***************
*** 1351,1359 ****
  /*
   * get_ether_addr - get the hardware address of an interface on the
   * the same subnet as ipaddr.
   */
! #define MAX_IFS		32
  
  static int
  get_ether_addr(ipaddr, hwaddr)
      u_int32_t ipaddr;
--- 1351,1359 ----
  /*
   * get_ether_addr - get the hardware address of an interface on the
   * the same subnet as ipaddr.
   */
! #define MAX_IFS		192
  
  static int
  get_ether_addr(ipaddr, hwaddr)
      u_int32_t ipaddr;
***************
*** 1395,1402 ****
--- 1395,1403 ----
  		continue;
  	    /*
  	     * Get its netmask and check that it's on the right subnet.
  	     */
+ 	    ifreq.ifr_addr.sa_family = AF_INET;
  	    if (ioctl(sockfd, SIOCGIFNETMASK, &ifreq) < 0)
  		continue;
  	    mask = ((struct sockaddr_in *) &ifreq.ifr_addr)->sin_addr.s_addr;
  	    if ((ipaddr & mask) != (ina & mask))
***************
*** 1489,1496 ****
--- 1490,1498 ----
  	    continue;
  	/*
  	 * Get its netmask and OR it into our mask.
  	 */
+ 	ifreq.ifr_addr.sa_family = AF_INET;
  	if (ioctl(sockfd, SIOCGIFNETMASK, &ifreq) < 0)
  	    continue;
  	mask |= ((struct sockaddr_in *)&ifreq.ifr_addr)->sin_addr.s_addr;
      }
Index: src/usr.sbin/rarpd/rarpd.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/rarpd/rarpd.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -4 -r1.1.1.1 -r1.2
*** src/usr.sbin/rarpd/rarpd.c	1999/03/15 19:29:43	1.1.1.1
--- src/usr.sbin/rarpd/rarpd.c	1999/04/29 22:00:01	1.2
***************
*** 293,300 ****
--- 293,301 ----
  
  	switch (family) {
  
  	case AF_INET:
+ 		ifr.ifr_addr.sa_family = AF_INET;
  		if (ioctl(s, SIOCGIFADDR, (char *)&ifr) < 0) {
  			syslog(LOG_ERR, "ipaddr SIOCGIFADDR: %s: %m",
  			    ii->ii_ifname);
  			exit(1);
***************
*** 342,350 ****
  	register int n;
  	register struct ifreq *ifrp, *ifend;
  	register struct if_info *ii, *nii, *lii;
  	struct ifconf ifc;
! 	struct ifreq ibuf[16];
  
  	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
  		syslog(LOG_ERR, "socket: %m");
  		exit(1);
--- 343,351 ----
  	register int n;
  	register struct ifreq *ifrp, *ifend;
  	register struct if_info *ii, *nii, *lii;
  	struct ifconf ifc;
! 	struct ifreq ibuf[192];
  
  	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
  		syslog(LOG_ERR, "socket: %m");
  		exit(1);
Index: src/usr.sbin/timed/timed/timed.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/timed/timed/timed.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -c -4 -r1.1.1.1 -r1.3
*** src/usr.sbin/timed/timed/timed.c	1999/03/15 19:30:03	1.1.1.1
--- src/usr.sbin/timed/timed/timed.c	1999/05/04 02:56:23	1.3
***************
*** 139,147 ****
  	int ret;
  	int nflag, iflag;
  	struct timeval ntime;
  	struct servent *srvp;
! 	char buf[BUFSIZ], *cp, *cplim;
  	struct ifconf ifc;
  	struct ifreq ifreq, ifreqf, *ifr;
  	register struct netinfo *ntp;
  	struct netinfo *ntip;
--- 139,147 ----
  	int ret;
  	int nflag, iflag;
  	struct timeval ntime;
  	struct servent *srvp;
! 	char buf[192*sizeof(struct ifreq)], *cp, *cplim;
  	struct ifconf ifc;
  	struct ifreq ifreq, ifreqf, *ifr;
  	register struct netinfo *ntp;
  	struct netinfo *ntip;
***************
*** 389,396 ****
--- 389,397 ----
  			continue;
  		}
  
  
+ 		ifreq.ifr_addr.sa_family = AF_INET;
  		if (ioctl(sock, SIOCGIFNETMASK, (char *)&ifreq) < 0) {
  			warn("get netmask");
  			continue;
  		}
Index: src/usr.sbin/xntpd/xntpd/ntp_io.c
===================================================================
RCS file: /var/CVS/FreeBSD31/src/usr.sbin/xntpd/xntpd/ntp_io.c,v
retrieving revision 1.1.1.1
diff -c -4 -r1.1.1.1 ntp_io.c
*** src/usr.sbin/xntpd/xntpd/ntp_io.c	1999/03/15 19:30:30	1.1.1.1
--- src/usr.sbin/xntpd/xntpd/ntp_io.c	1999/05/04 02:59:25
***************
*** 322,329 ****
--- 322,330 ----
  		ioc.ic_dp = (caddr_t)&ifreq;
  		ioc.ic_len = sizeof(struct ifreq);
  		if(ioctl(vs, I_STR, &ioc)) {
  #else /* ! STREAMS_TLI */
+ 		ifreq.ifr_addr.sa_family = AF_INET;
  		if (ioctl(vs, SIOCGIFADDR, (char *)&ifreq) < 0) {
  #endif /* STREAMS_TLI */
  			syslog(LOG_ERR, "get interface addr: %m");
  			continue;

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905051607.MAA03078>