Messages in this thread | | | From | Ian Dall <> | Date | Wed, 29 Aug 2001 13:34:31 +0930 | Subject | IPCONFIG fails for BOOTP |
| |
Kernel version 2.4.8-ac9
I am attempting to set up a linux based xterm. The kernel loads but times out attempting to get ipaddresses etc in ipconfig. The following are defined in "include/linux/autoconf.h":
#define CONFIG_IP_PNP 1 #define CONFIG_IP_PNP_DHCP 1 #define CONFIG_IP_PNP_BOOTP 1 #undef CONFIG_IP_PNP_RARP
A few printk's latter and it seems that the problem is in ic_bootp_recv() around line 843:
#ifdef IPCONFIG_DEBUG printk("DHCP: Got message type %d\n", mt); #endif
switch (mt) { case DHCPOFFER:
[.....]
default: /* Urque. Forget it*/ ic_myaddr = INADDR_NONE; ic_servaddr = INADDR_NONE; goto drop; }
At this point we could be receiving either DHCP *or* BOOTP extensions. The code to handle the BOOTP extension follows, but is never executed because of the "goto drop" in the default case for handling dhcp packets. If the kernel were compiled without DHCP this problem would go away.
There are two possibilities to fix this. One is to fall through to the bootp case instead of going to drop, or maybe fold the bootp code into the default case of the switch statement. The only problem then seems to be how to conditionalize the DHCP support.
Ian - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |