From 7bed60c4ebd1fbffb71b1bffaae809c34462cdfa Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 23 Jan 2022 16:43:51 +0100 Subject: yggdrasil-wg: ensure routes are set --- modules/yggdrasil-wg/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 16f8d3a9..cab1276a 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix @@ -208,19 +208,22 @@ in { routes = [ { routeConfig = { Destination = "${batSubnet}::/${toString batSubnetLength}"; + GatewayOnLink = true; }; } { routeConfig = { Destination = "${batSubnet}::/${toString batSubnetLength}"; + GatewayOnLink = true; Table = "yggdrasil"; }; } { routeConfig = { Destination = batHostIPs.${hostName}; + GatewayOnLink = true; Table = "yggdrasil"; }; } - ] ++ (concatMap (router: map (rAddr: { routeConfig = { Destination = "::/0"; Gateway = stripSubnet rAddr; Table = "yggdrasil"; }; }) batHostIPs.${router}) routers); + ] ++ (concatMap (router: map (rAddr: { routeConfig = { Destination = "::/0"; Gateway = stripSubnet rAddr; GatewayOnLink = true; Table = "yggdrasil"; }; }) batHostIPs.${router}) routers); routingPolicyRules = map (addr: { routingPolicyRuleConfig = { Table = "yggdrasil"; From = stripSubnet addr; Priority = 1; }; }) batHostIPs.${hostName}; linkConfig = { MACAddress = "${batHostMACs.${hostName}}"; -- cgit v1.2.3