I have a Pi with 2 wireless interfaces, 1 is connected to the networks gateway, the other which is acting as an access point thanks to hostapd.
The AP is not running any DHCP or NAT software, simply running hostapt to allow multiple devices to connect to it.
I am trying to connect my laptop to this access point.
Using static IP address and manually entering in gateway address, DNS etc it works perfectly fine.
However when I try to connect using DHCP it does not work, from wireshark I can see that the initial DHCP Discover packet is sent to the access point upon attempting to connect. However this packet is then not forwarded out of the interface connected to the gateway despite the fact I have some bridging software that i wrote in python running on the Pi.
The software simply sends packets out on the opposite interface they were received on (An oversimplification of what it does, but that is the general jist for this scenario, it is a Network Bridge). So the AP interface should receive the DHCP packet and forward it onto the gateway, which should reply with the DHCP offer etc.
The software works as i can see other DHCP inform messages on my laptop that have gone through the bridging software, as well as other DHCP discover/offer/request/acks that the bridging software is sending to my laptop at the moment due to them being broadcasts.
I am wondering whether the reason these DHCP Discover packets are not being forwarded onto the gateway is due to some setting or feature of the hostapd access point?
I am confident the problem does not lie with the code i have written as it works perfectly fine for DNS and the like.
Further more if I manually craft a DHCP Discovery packet then it gets forwarded and outputted by the interface connected to the gateway with no issues, the DHCP packets only don't get forwarded when they are sent automatically by my laptop trying to obtain and IP address from the access point it is trying to connect to.
I would assume that the access point does not need to supply the IP address directly, but can contact the actual DHCP server on the network to assign one correctly.
If anyone has any idea why the packet seems to get absorbed by the access point before it can be forwarded to the other interface please let me know!