ipv6 default route

needs to specify the ppp0 *peer* address not the local address
This commit is contained in:
Daniel Barlow
2023-06-30 10:17:33 +01:00
parent 5306b36181
commit b6e72504d6
3 changed files with 16 additions and 5 deletions

View File

@@ -45,14 +45,15 @@ in {
pppoe = callPackage ./pppoe.nix {};
dnsmasq = callPackage ./dnsmasq.nix {};
hostapd = callPackage ./hostapd.nix {};
route = { name, target, via, dependencies }:
oneshot {
route = { name, target, via, dependencies, dev ? null }:
let with_dev = if dev != null then "dev ${dev}" else "";
in oneshot {
inherit name;
up = ''
ip route add ${target} via ${via}
ip route add ${target} via ${via} ${with_dev}
'';
down = ''
ip route del ${target} via ${via}
ip route del ${target} via ${via} ${with_dev}
'';
inherit dependencies;
};