dhcp help!
li
Yes,I think that I configure the dhcp server correctly. I let one PC
to dynamically obtain IP address from the DHCP server I configured and it got one smoothly from the server. Then I use 'ethereal' to capture packets,and the result showed that "dhcp discover" packets and "dhcp offer" packets were all correct.
Quoted 37 lines
did you configure the dpcpd in the host properly?
Quoted 36 lines
Can anyone tell me where the mumber
in_device*ip_ptrof the
structnet_deviceis initialized?
I enable the DHCP and BOOTP kernel configurations,but I can not
boot my kernel successfully!
The target sent dhcp discover message packet to the host
server,and the host server replied it with a dhcp offer message packet.The target's ethernet card received the dhcp offer packet and sent it to the IP protocol stack correctly.But the network layer dropped the packet!I traced the packet receive process and found that when the functionip_rcv_finish()was called,it called the function ip_route_input(),thenip_route_input()called ip_route_input_slow(),thenip_route_input()calledin_device*in_dev=in_dev_get(dev)which returned NULL! the source code of the functionin_dev_get(dev)is shown below:static
__inline__structin_device*in_dev_get(const struct net_device *dev){ struct in_device *in_dev; read_lock(&inetdev_lock); in_dev = dev->ip_ptr; if (in_dev) atomic_inc(&in_dev->refcnt); read_unlock(&inetdev_lock); return in_dev; }I checked the kernel startup code and I found that when the
target dynamicly went to obtain its IP address,and when functionin_dev_get(dev)was called,the mumberin_device*ip_ptrof the structnet_device*dev had not been initialized. I am confused by this trouble.Is DHCP really used as I described? Did I make any mistake?BTW: I use montavista linux 2.1
Yuxiao Xi
[email protected]
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/