NetBSD Problem Report #18574

Received: (qmail 5197 invoked by uid 605); 7 Oct 2002 19:58:43 -0000
Message-Id: <200210071958.g97Jwps00873@kronos.ouranos>
Date: Mon, 7 Oct 2002 12:58:51 -0700 (PDT)
From: kirill@lava.net
Sender: gnats-bugs-owner@netbsd.org
Reply-To: kirill@lava.net
To: gnats-bugs@gnats.netbsd.org
Subject: bootpd behavior inconsistent with manual
X-Send-Pr-Version: 3.95

>Number:         18574
>Category:       bin
>Synopsis:       bootpd behavior inconsistent with manual
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 07 19:59:00 +0000 2002
>Closed-Date:    
>Last-Modified:  
>Originator:     Kirill Levchenko
>Release:        NetBSD 1.6
>Organization:

>Environment:


System: NetBSD kronos.ouranos 1.6 NetBSD 1.6 (kronos) #1: Fri Sep 27 16:14:00 PDT 2002 root@kronos.ouranos:/usr/src/sys/arch/i386/compile/kronos i386
Architecture: i386
Machine: i386
>Description:
	Manual for bootptab states, in the paragraph about ht and ha fields,
	that if the type is ethernet or ieee802 and the hardware address is
	not specified, then bootpd will determine the hardware address using
	ether_hostton (i.e., /etc/ethers).

	The current implementation appears to be looking for the host name
	in the ha tag.
>How-To-Repeat:
	Specify ht=ethernet and omit the ha tag in a bootptab entry. Then
	start bootpd and send USR1 signal to dump entries. Observe that
	the ethernet address is not present.
>Fix:
	Apply the following patch to bootp/common/readfile.c.

--- /usr/src/usr.sbin/bootp/common/readfile.c	Mon Aug 20 05:00:57 2001
+++ readfile.c	Fri Oct  4 01:12:29 2002
@@ -437,0 +438,12 @@
+#ifdef	ETC_ETHERS
+			/* Lookup hardware address. */
+			if (hp->flags.htype && hp->flags.haddr == 0 &&
+					(hp->htype == HTYPE_ETHERNET || hp->htype == HTYPE_IEEE802)) {
+				char *ha;
+				ha = lookup_hwa(hn, hp->htype);
+				if (ha) {
+					bcopy(ha, &hp->haddr, haddrlength(hp->htype));
+					hp->flags.haddr = TRUE;
+				}
+			}
+#endif /* ETC_ETHERS */
@@ -1796,11 +1807,0 @@
-
-#if 1	/* XXX - experimental */
-	/* If it's a valid host name, try to lookup the HW address. */
-	if (goodname(p)) {
-		/* Lookup Hardware Address for hostname. */
-		if ((hap = lookup_hwa(p, htype)) != NULL)
-			return hap; /* success */
-		report(LOG_ERR, "Add 0x prefix if hex value starts with A-F");
-		/* OK, assume it must be numeric. */
-	}
-#endif
>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.