11 Commits

Author SHA1 Message Date
Michael Stapelberg
520b8ca41d dhcp: use SetReadDeadline, not SetDeadline
related to https://github.com/mdlayher/raw/issues/42
2019-03-21 09:16:44 +01:00
Michael Stapelberg
856c5b62d4 dhcp: request domain name, too 2019-01-01 17:17:02 +01:00
Michael Stapelberg
3af32e1d14 dhcp: resolve a few TODOs in comments 2018-11-21 08:46:16 +01:00
Michael Stapelberg
14287515bc dhcp: switch to github.com/rtr7/dhcp4
All existing DHCPv4 packages I looked at were unappealing for one reason or
another, so we’re now using a little helper to glue github.com/google/gopacket
and github.com/mdlayher/raw together, which suffices for our use-case and gives
us more control.
2018-11-21 08:43:49 +01:00
Michael Stapelberg
9a14ab0d8d dhcp: add note to prevent future mistakes 2018-06-22 09:02:53 +02:00
Michael Stapelberg
4a126f13af init+dhcp changes for Squashfs root file systems
We can do away with a bunch of hacks now, but we’ll keep them around for a
little while to make updates easier (i.e. to boot with old and new gokr-packer
versions, just in case people don’t update both at the same time).
2018-06-21 23:21:51 +02:00
Tobias Klauser
50b9390a43 dhcp: simplify Utsname conversion (#36)
Utsname from golang.org/x/sys/unix contains byte array members instead of
int8/uint8. This allows to simplify the NULL byte indexing in
addHostname.
2018-03-29 12:09:08 +02:00
Michael Stapelberg
32e8b6dd34 dhcp: persist domain name to resolv.conf if specified 2017-09-19 14:48:36 +02:00
Michael Stapelberg
6127f9566e dhcp: set client id (option 61), some routers need it
E.g. /etc/kresd/dhcp_host_domain_ng.sh on a turris omnia incorrectly deletes
DHCP hostname mappings when more than one client does not send a client id.
2017-09-05 09:52:53 +02:00
Michael Stapelberg
13173460da dhcp: set hostname for renewal packets as well
Otherwise, router restarts might result in the hostname getting
lost (observed using dnsmasq on OpenWrt).
2017-07-01 11:29:10 +02:00
Michael Stapelberg
38af7fd18d Initial commit 2017-03-04 11:22:48 +01:00