lordwelch
69200acf90
Implement NTP server from DHCP
2021-01-09 15:16:47 -08:00
Michael Stapelberg
546057ad9b
ntp: log a message after setting the clock
...
related to https://github.com/gokrazy/tools/issues/15
2020-06-21 07:42:00 +02:00
Michael Stapelberg
9e57e3cf2e
dhcp: make network interface name configurable
...
related to https://github.com/gokrazy/gokrazy/issues/57
2020-05-27 08:24:50 +02:00
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
835dae6a18
add randomd (carries entropy across restarts)
2018-07-13 23:44:47 +02: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
Michael Stapelberg
6c059494af
ntp: set real-time clock (hwclock) if present
2018-06-13 23:51:31 +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
3ed1e381b5
ntp: drop privileges to nobody/nogroup, retain CAP_SYS_TIME
2017-09-03 22:21:00 +02:00
Michael Stapelberg
83adedae5d
ntp: use gokrazy vendor zone
...
fixes #34
2017-08-25 09:24:15 +02:00
Michael Stapelberg
eb8f1753b3
ntp: react to breaking API change
...
See https://github.com/beevik/ntp/pull/14
2017-08-23 09:51:01 +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