Commit Graph

7 Commits

Author SHA1 Message Date
Matt Layher
c41aa79265 dhcp4: parse transaction ID as a byte slice 2018-02-03 11:23:32 -08:00
David Anderson
e78af6b0e8 dhcp4: only run the linuxConn tests on linux.
Seems obvious when you say it like that! Fixes #41.
2017-06-01 20:11:50 -07:00
David Anderson
e9e2bb6f2d dhcp4: avoid reusing bs between the writing and reading tests.
Although it looks like the sequencing of writing bs to the socket
and reusing the slice for the read test is guaranteed by there being
a receive from the socket in between, the race detector disagrees, and
found a race.
2017-06-01 20:07:28 -07:00
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
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