I am testing PXE Boot Server Discovery using undionly.kpxe (from ipxe commit f3c2da7) and I have noticed the broadcast replies are being rejected.
I PXE boot into undionly.kpxe and then run 'dhcp net0' to get an IP address for my interface. Then I run 'pxebs net0 65535' and during that PXEBS request the response packet is rejected. Here is a packet capture during pxebs: [1] 00:0f:53:08:0a:10 > Broadcast, ethertype IPv4 (0x0800), length 447: 192.168.0.100.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:0f:53:08:0a:10, length 405 [2] 00:0f:53:07:bf:04 > Broadcast, ethertype IPv4 (0x0800), length 312: 192.168.0.97.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 270 [3] 00:0f:53:08:0a:10 > Broadcast, ethertype IPv4 (0x0800), length 447: 192.168.0.100.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:0f:53:08:0a:10, length 405 Packet #2 is the reply from one of the servers and it is to a broadcast IP address of 255.255.255.255 and broadcast MAC ff:ff:ff:ff:ff:ff. Building undionly.kpxe with 'DEBUG=dhcp,ipv4,udp' I get the following debug messages during pxebs: ========================= DHCP 0x1f654 attempting 255.255.255.255 UDP 0x1f714 allocated UDP 0x1f714 bound to port 68 DHCP 0x1f654 entering PXEBS state DHCP 0x1f654 PXEBS REQUEST to 255.255.255.255:67 for type 65535 No UDP connection listening on port 68 IPv4 received packet rejected by stack: The socket is not connected ... more PXEBS requests UDP 0x1f714 closed Connection timed out Could not discover boot server on net0: Connection timed out ========================= The packet is rejected because it doesn't match any of the udp_conns in udp_demux() - this is because we have added the local IP address to the socket at the beginning of start_pxebs(). My understanding is the we should be operating in promiscuous mode and we specifically set the BOOTP flag for BROADCAST since we have an IP address at this point, so I believe the reply from the boot server is correct. Does what I have described make sense (is this a bug?) or do I have an error in my setup? Another way of looking at this by ignoring the boot server setup: if I start pxebs and then inject any UDP broadcast (MAC and IP) packet back to the client I see it dropped in the same way. I think that is a bug but I'd appreciate other opinions in case I'm misunderstanding this. Daniel The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited. _______________________________________________ ipxe-devel mailing list [email protected] https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

