Commit Graph

6 Commits

Author SHA1 Message Date
David Anderson
fbcb237a6d dhcp4: bind listeners to 0.0.0.0 and filter based on received interface.
Some DHCP messages are broadcast to 255.255.255.255, and binding to a
specific address filters those packets out. Instead, we have to translate
the "listen on ip:port" intent to "listen on interface:port", and filter
based on the interface that received the packet.

Fixes #27.
2017-01-05 00:29:13 -08:00
David Anderson
f061a783a7 dhcp4: Don't use the non-binding DHCP Conn silently on linux.
pixiecore: Plumb NewSnooperConn into Server as an advanced option.
pixiecore/cli: Plumb DHCPNoBind to the CLI.

Now, by default, Pixiecore will bind() to the DHCP server port in a way
that shows up in `netstat` by default. If you want to enable the "coexist
with my existing DHCP server" mode, you need to explicitly pass
--dhcp-no-bind.
2016-08-28 16:16:47 -07:00
David Anderson
879aab828e dhcp4: correct the default address for linuxConn.
net.ListenPacket wants an actual IP address, whereas ":67" gives you a nil.
2016-07-17 01:59:10 -07:00
David Anderson
7a39e0e685 Actually name the package correctly, so that it can be imported. 2016-05-17 21:52:27 -07:00
David Anderson
53e4bfd991 dhcp4: refactor the low-level packet sending.
This lets the implementations share the transmission strategy and
decoding/sanity logic.
2016-05-15 14:56:09 -07:00
David Anderson
50f74885e9 dhcp: rename to dhcp4. 2016-05-15 13:39:49 -07:00