DHCP relay - wrong interface for relayed packet
Paul Thornton
paul at prt.org
Thu Jul 7 12:37:27 UTC 2022
Hi Alan,
On 07/07/2022 12:51, Alan DeKok wrote:
> Yup. Packets using that socket are being sent via vlan4091, because that socket is bound to interface vlan4091.
That makes perfect sense. Thanks for the steer, I did wonder if it was
something like that.
I presume that to listen for DHCP packets, we need to operate on a
per-interface basis to be able to receive broadcasts; so operating with
one socket - not bound to any specific interface - and listening on that
isn't going to be an option.
> The solution is to create a new outbound socket, specifically for DHCP relaying. It can be bound to "*" for the IP, and then the normal DHCP port.
>
> There are a few ways to do this... one might be to simply create a "wildcard" DHCP listener, which doesn't have an "interface" configured. Then somehow update proto_dhcp/dhcpd.c to choose this listener for relayed packets.
>
> It's likely not hard, it just requires a bit of spelunking in the code.
My C isn't up to fixing this properly but I'm going to attempt a quick
hack proof-of-concept to see if it does work.
Thanks,
Paul.
More information about the Freeradius-Users
mailing list