28 Commits

Author SHA1 Message Date
Michael Stapelberg
281f876834 integration/netconfig: verify wg(8) is available
The kernel used on GitHub actions now allows creating wireguard interfaces
apparently.
2020-07-02 21:14:35 +02:00
Matt Layher
fe68c2dd52
internal/radvd: add support for DNSSL (#47)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-05-23 19:52:52 +02:00
Matt Layher
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
Matt Layher
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
Michael Stapelberg
9fe38edec0 netconfig_test: force an order for IP address golden output 2019-08-07 18:13:52 +02:00
Michael Stapelberg
c0067c5aa5 change diff order to -want +got
This is easier to read and consistent with how we do things at work.
2019-07-11 08:42:21 +02:00
Michael Stapelberg
414a7c025b use nft’s --numeric flag for stable output across 0.9.0 and 0.9.1
nftables 0.9.1 started printing e.g. “priority 0” as “priority filter”.
2019-07-11 08:39:08 +02:00
Michael Stapelberg
554d7fa8bf netconfig_test: fix goldens after nftables change
The nftables package started honoring the rule position (insert vs. append), and
it turns out our goldens have been wrong all along. Now the configured order
matches the golden order.
2019-07-11 08:28:33 +02:00
Michael Stapelberg
fa91770b09 integration/dns: 8.8.8.8’s RDNS changed to dns.google. 2019-07-01 08:55:10 +02:00
Michael Stapelberg
badee1eef8 netconfig_test: skip test if WireGuard is unavailable 2018-11-26 18:43:04 +01:00
Michael Stapelberg
ec4f1f4dc5 netconfig: implement WireGuard support
To set up a tunnel, create a /perm/wireguard.json as illustrated in
netconfig_test.go, and don’t forget to adjust your /perm/interfaces.json with
the address configuration for the WireGuard tunnel.

Note that static routes cannot currently be configured, so the usefulness is
limited. If you have a use-case you’d like to see covered, please explain it in
https://github.com/rtr7/router7/issues/14
2018-11-26 18:29:03 +01:00
Michael Stapelberg
b6a5227d49 netconfig_test: better diffs, refactor for clarity/brevity 2018-11-26 08:46:59 +01:00
Michael Stapelberg
127bdc466e netconfig_test: use ip -netns instead of ip netns exec ip 2018-11-26 08:32:38 +01:00
Michael Stapelberg
df9a40557c dhcp4: correctly check errors from c.once 2018-11-21 08:41:24 +01:00
Michael Stapelberg
30e9a6677b integration/dhcpv4: print unified line-wise diff
This is much more readable than the go-cmp Diff() output when dealing with
[]string lines.
2018-11-18 14:29:30 +01:00
Michael Stapelberg
2e8e0daa0a implement TCP MSS clamping (for non-ethernet uplinks)
We didn’t have a need to clamp the TCP Maximum Segment Size (MSS) up until now,
because fiber7 uses an MTU of 1500.

Because Path MTU discovery is often broken on the internet, it’s best practice
to limit the Maximum Segment Size (MSS) of each TCP connection, achieving the
same effect (but only for TCP connections).

This change is beneficial when running router7 behind a non-ethernet uplink,
such as a Fritz!Box cable modem.

This has no adverse effect on fiber7: after clamping, the MSS is still 1440, as
without clamping.
2018-10-22 18:54:25 +02:00
Michael Stapelberg
f7638dfeaa netconfig_test: test updating port forwardings after installation
This uncovered an nftables issue:
695079ebff
2018-10-03 18:24:54 +02:00
Michael Stapelberg
b03596f1c5 nftables: use stateful object counters
This way, we can atomically get and reset them.

fixes https://github.com/rtr7/router7/issues/3
2018-08-08 23:15:21 +02:00
Michael Stapelberg
ea10307b5d dhcpv4: replace hard-coded midna → os.Hostname() 2018-07-14 17:35:25 +02:00
Michael Stapelberg
9e0f83a7cf integration tests: send ip netns add errors to stderr, too 2018-07-14 15:43:47 +02:00
Michael Stapelberg
b347ed74c5 update import paths 2018-07-09 08:54:04 +02:00
Michael Stapelberg
8615c40fac netconfig_test: reset DefaultCounter to catch preservation issues 2018-06-28 20:08:23 +02:00
Michael Stapelberg
ff7aa8f2cb add copyright notices 2018-06-28 20:08:23 +02:00
Michael Stapelberg
89e1276ad4 dns: simplify resolving code 2018-06-26 09:33:23 +02:00
Michael Stapelberg
8e95e25442 radvd: announce link-local ipv6 address for DNS 2018-06-26 09:04:05 +02:00
Michael Stapelberg
10df129c1f dns: listen on all private IP addresses 2018-06-26 08:53:20 +02:00
Michael Stapelberg
a881f6b61e cut down on test noise 2018-06-24 12:06:40 +02:00
Michael Stapelberg
5a07d6696d split integration tests into multiple packages
This makes them complete more quickly (because they are run in parallel) and
invalidates only the cache for the integration test I’m working on, not for all
of them.
2018-06-24 11:46:49 +02:00