Fix ipv6 support for gre module
This commit is contained in:
parent
5f95721f3d
commit
fff74fed87
@ -72,8 +72,15 @@
|
||||
|
||||
clerie.gre-tunnel = {
|
||||
enable = true;
|
||||
ipv6= {
|
||||
gre-gatekeeper6 = {
|
||||
remote = "fd00:152:152:101::1";
|
||||
local = (lib.head config.networking.interfaces.lo.ipv6.addresses).address;
|
||||
address = "fd00:153:153:201::2/64";
|
||||
};
|
||||
};
|
||||
ipv4 = {
|
||||
gre-gatekeeper = {
|
||||
gre-gatekeeper4 = {
|
||||
remote = "10.152.101.1";
|
||||
local = (lib.head config.networking.interfaces.lo.ipv4.addresses).address;
|
||||
address = "169.254.201.2/24";
|
||||
|
@ -124,8 +124,15 @@
|
||||
|
||||
clerie.gre-tunnel = {
|
||||
enable = true;
|
||||
ipv6= {
|
||||
gre-carbon6 = {
|
||||
remote = "fd00:152:152:104::1";
|
||||
local = (lib.head config.networking.interfaces.lo.ipv6.addresses).address;
|
||||
address = "fd00:153:153:201::1/64";
|
||||
};
|
||||
};
|
||||
ipv4 = {
|
||||
gre-carbon = {
|
||||
gre-carbon4 = {
|
||||
remote = "10.152.104.1";
|
||||
local = (lib.head config.networking.interfaces.lo.ipv4.addresses).address;
|
||||
address = "169.254.201.1/24";
|
||||
|
@ -21,7 +21,7 @@ let
|
||||
|
||||
script = ''
|
||||
${tunnel.preSetup}
|
||||
ip${optionalString isIPv6 " -6"} tunnel add ${name} mode gre remote ${tunnel.remote} local ${tunnel.local}
|
||||
ip${optionalString isIPv6 " -6"} tunnel add ${name} mode ${optionalString isIPv6 "ip6"}gre remote ${tunnel.remote} local ${tunnel.local}
|
||||
ip link set ${name} up
|
||||
ip${optionalString isIPv6 " -6"} a add ${tunnel.address} dev ${name}
|
||||
${tunnel.postSetup}
|
||||
|
Loading…
Reference in New Issue
Block a user