*** From dhcp-server -- To unsubscribe, see the end of this message. ***
DHCP version: dhcp-beta 2.0b1 pl 6
Operating system: Linux 2.0.34 - 2.0.36
I run dhcpd in a router that has a tunnel device tunl0 on the hard-
ware interface eth0. Dhcpd is to serve requests from a separate hard-
ware interface eth1. Dhcpd refuses to operate in this environment: it
exits with the error message
tunl0: unknown hardware address type 768
The problem comes from the function discover_interfaces() in the file
common/dispatch.c. Dhcpd scans all interfaces and exits with an error
if an unrecognized hardware address type is met, whether the interface
is used or not.
The problem can be fixed by ignoring the interfaces of unknown types.
The loopback interface was already ignored. It can be included in the
general case. See the patch below. The patched program reports
unsuitable interfaces given in a command line e.g.:
# dhcpd tunl0
tunl0: not found, or unsupported hardware address type
Admittedly, this message is vague, bunching nonexistent and unsupported
interfaces together, but fixing this appears to require somewhat deeper
changes in the program.
==== begin patch =======================================================
diff -Naur dhcp-beta-2.0b1pl6.orig/common/dispatch.c dhcp-beta-2.0b1/common/dispatch.c
--- dhcp-beta-2.0b1pl6.orig/common/dispatch.c Thu Jun 25 21:11:28 1998
+++ dhcp-beta-2.0b1/common/dispatch.c Sun Mar 21 16:52:18 1999
@@ -201,12 +201,6 @@
sa = *(struct sockaddr *)&ifr.ifr_hwaddr;
switch (sa.sa_family) {
-#ifdef ARPHRD_LOOPBACK
- case ARPHRD_LOOPBACK:
- /* ignore loopback interface */
- break;
-#endif
-
case ARPHRD_ETHER:
tmp -> hw_address.hlen = 6;
tmp -> hw_address.htype = ARPHRD_ETHER;
@@ -235,8 +229,8 @@
#endif
default:
- error ("%s: unknown hardware address type %d",
- ifr.ifr_name, sa.sa_family);
+ /* Ignore */
+ continue;
}
#endif /* defined (SIOCGIFHWADDR) && !defined (AF_LINK) */
@@ -327,7 +321,8 @@
INTERFACE_REQUESTED);
if (!tmp -> ifp || !(tmp -> flags & INTERFACE_REQUESTED)) {
if ((tmp -> flags & INTERFACE_REQUESTED) != ir)
- error ("%s: not found", tmp -> name);
+ error ("%s: not found, or unsupported hardware
+address type",
+ tmp -> name);
if (!last)
interfaces = interfaces -> next;
else
==== end patch ===========================================================
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dhcp/lists
If you are without web access, or if you are having trouble with the web page,
please send mail to [EMAIL PROTECTED] Please try to use the web
page first - it will take a long time for your request to be processed by hand.
------------------------------------------------------------------------------