f1e4ee0662
dyndns: don’t crashloop when config does not exist
...
related to #46
2020-05-28 09:46:37 +02:00
7950291db6
dyndns: tweak up-to-date message output
2020-05-28 09:42:55 +02:00
4a5f55a5de
defense in depth: verify hex.DecodeString length
...
related to #49
2020-05-27 09:50:04 +02:00
ead58ad72c
cmd/dyndns: prototype for dynamic DNS daemon ( #50 )
...
Updates #46 .
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-23 23:06:21 +02:00
7aeb51e9ec
internal/dhcp4d: handle DHCPDECLINE and fix bug regarding MacBook declining leases ( #48 )
...
Fixes #40
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-23 20:53:13 +02:00
fe68c2dd52
internal/radvd: add support for DNSSL ( #47 )
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-23 19:52:52 +02:00
53c495091e
quirk: enforce minimum lease time of 1 hour for Nintendo devices
...
The Nintendo Switch has been observed to hold on to IP addresses even after
their expiration. My guess is that this is an oversight: likely the device
enters power saving mode with a configured IP address and just sleeps through
the expiration time.
As the device seems to wake up once every hour, we enforce a minimum lease time
of 1 hour, but only for affected devices. The rest of the network gets short
lease times.
https://twitter.com/zekjur/status/1263949112036282374
2020-05-23 09:07:17 +02:00
d81b77a876
Merge pull request #44 from mdlayher/mdl-staticcheck
...
*: apply staticcheck fixes
2020-05-09 23:07:34 +02:00
61174cde06
internal/netconfig: add missing error check
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 17:04:31 -04:00
9f6257b046
internal/dns: fix staticcheck issues
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 17:02:33 -04:00
b8c40958e8
internal/dhcp6: fix error case
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 17:00:43 -04:00
411780cd8e
internal/dhcp4: fix error case
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 17:00:07 -04:00
988aa405be
cmd/dhcp4d: make use of unused assignment
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 16:58:57 -04:00
f87891a74b
integration/radvd: panic in goroutine instead of fatal
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 16:56:51 -04:00
dd7c3a8a5f
internal/testing/dnsmasq: panic in goroutine instead of fatal
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 16:55:46 -04:00
8efea22943
internal/radvd: remove dead types
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 16:52:52 -04:00
e1f2b975a1
internal/dhcp4d: fix staticcheck issues
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 16:51:32 -04:00
107a8f0425
internal/radvd: switch to github.com/mdlayher/ndp types ( #43 )
...
Signed-off-by: Matt Layher <mdlayher@gmail.com >
2020-05-09 22:50:44 +02:00
9b6271749b
fix Makefile/go.mod
2020-05-09 22:40:49 +02:00
46327c5105
update go.mod
2020-05-09 22:17:10 +02:00
4e6a7016de
commit Makefile
2020-05-09 22:14:37 +02:00
2b6ab5b2bd
dhcp4d: make hostname override settable from status page
2020-04-12 10:33:11 +02:00
4f0efc7b18
dhcp6: use new IAPD & Prefix getters ( #41 )
...
Signed-off-by: Chris Koch <chrisko@google.com >
2020-03-13 08:47:38 +01:00
e67fb4dd71
diagd: make output look good in a terminal, too
...
curl diagd.router7/
2020-03-11 22:12:00 +01:00
ffc4c21bcd
dhcp6: use new getters ( #37 )
...
Signed-off-by: Chris Koch <chrisko@google.com >
2020-03-07 09:35:59 +01:00
989bfadc88
travis: switch to Go 1.14
2020-03-07 08:14:06 +01:00
5936d954dd
go mod tidy
2020-02-16 00:16:10 +01:00
dba1dad718
wireguard: switch to wgctrl package
...
related to #14
2020-02-16 00:15:23 +01:00
bfba9f17af
netconfigd: collect all errors but keep going
2020-02-15 23:38:37 +01:00
96b626897a
netconfigd: work not only with uplink0, but also eth0 and ens3
...
This makes it possible to use netconfigd on gokrazy Raspberry Pi installations.
2020-02-15 23:37:29 +01:00
ef60a01f3f
netconfigd: continue if interfaces.json does not exist
2020-02-15 23:35:51 +01:00
23961749ef
declare go.mod
2020-02-15 20:41:54 +01:00
3e17ed7697
travis: bump to go 1.13
2020-02-15 09:55:44 +01:00
e34148d4e7
dhcp4d: add some leeway for lease activity
2020-02-06 18:48:19 +01:00
a543cb9a34
dhcp4d: add header describing whether lease is active
...
Should be interpreted by the DHCP server so that other programs don’t need to
hard-code the lease time.
2020-01-31 19:11:08 +01:00
a2ea8c2f95
cmd/dhcp4d: refactor for testing, add /lease/ test
2020-01-31 19:00:51 +01:00
4558cb61b4
dhcp4d: serve lease json data at /lease/<hostname>
2020-01-31 18:30:18 +01:00
3707ba290c
dhcp4d: move http.HandleFunc into logic
2020-01-31 18:25:02 +01:00
41985d6378
dhcp4d: reduce lease period to 20 minutes
...
This forces devices to renew the lease more often, which is nice when you want
to tie home automation behavior to DHCP lease validity.
2020-01-31 18:23:50 +01:00
e76886dab4
dhcp4d: protect leases with a mutex
...
The HTTP handler runs in a separate goroutine.
2020-01-31 18:23:19 +01:00
73bd5c6a50
dhcp6: T1 is now already a time.Duration
...
see https://github.com/insomniacslk/dhcp/pull/347
2020-01-03 08:06:17 +01:00
3b5cf99b29
dhcp6_test: add new DHCPv6 infra packet capture
2019-12-02 10:43:39 +01:00
70edcab16b
dns: return NXDOMAIN for DHCP leases once they expire
2019-09-07 19:27:12 +02:00
fa82132962
dhcp4d: add HostnameOverride field
...
This can be used to permanently override a hostname, regardless of whether the
lease is static or not. We use a separate field because we want devices to be
able to change their hostname themselves, until we override it.
2019-08-30 09:06:21 +02:00
4cde5ec6fc
dns: fix resolution of uppercase host names, add test
2019-08-07 18:18:51 +02:00
9fe38edec0
netconfig_test: force an order for IP address golden output
2019-08-07 18:13:52 +02:00
8fb81f90b1
dns: make more recent DHCP leases overwrite older ones
...
fixes #20
2019-07-20 12:23:48 +02:00
36995097b9
make local name resolution case-insensitive
...
fixes #34
2019-07-20 12:07:30 +02:00
975f05d7ac
fix dhcp4d_test.go
2019-07-20 11:30:52 +02:00
323cc42b8e
dhcp4d: polish status page, actually update it upon changes
2019-07-20 11:07:11 +02:00