Do UDP broadcasts work in FreeBSD?

Peter Steele psteele at maxiscale.com
Tue Jan 6 14:38:28 PST 2009


> I've already looked at the ISC DHCP source code. They use raw sockets
to
> send their broadcasts, which seems to us to be a convoluted way of
> sending a simple broadcast. I've seen examples of DHCP client/server
> code written in Java using standard UDP. Unfortunately, our own system
> is already largely implemented in Java/Python, so we'll need to
provide
> a JNI interface to support raw sockets. Alternatively we may patch the
> kernel to fix the bug at its source.

Another option we're considering is to use the firewall to detect
broadcasts and rewrite the MAC addresses in the outgoing packets. In
looking at tcpdump output of broadcasts, the IP address is set to
255.255.255.255 and the MAC address is set to the MAC address of the
gateway. On Linux boxes the MAC address is ff:ff:ff:ff:ff:ff, and that's
the only significant difference in the packet. We thought we might be
able to come up with a firewall rule to detect broadcasts and change the
MAC address to the same as what Linux uses. I'm still in the process of
researching this, but if someone can tell me this is impossible, I'll
move on.



More information about the freebsd-questions mailing list