Skip to content

Commit 6860268

Browse files
authored
Merge pull request #1056 from gravitl/feature_v0.13.1_versioning
fixing ipv6
2 parents 8fa18f8 + 80cc867 commit 6860268

File tree

6 files changed

+14
-2
lines changed

6 files changed

+14
-2
lines changed

compose/docker-compose.contained.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ services:
1616
- net.ipv4.ip_forward=1
1717
- net.ipv4.conf.all.src_valid_mark=1
1818
- net.ipv6.conf.all.disable_ipv6=0
19+
- net.ipv6.conf.all.forwarding=1
1920
restart: always
2021
environment:
2122
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"

compose/docker-compose.nocaddy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ services:
1616
- net.ipv4.ip_forward=1
1717
- net.ipv4.conf.all.src_valid_mark=1
1818
- net.ipv6.conf.all.disable_ipv6=0
19+
- net.ipv6.conf.all.forwarding=1
1920
restart: always
2021
environment:
2122
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"

compose/docker-compose.nodns.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ services:
1616
- net.ipv4.ip_forward=1
1717
- net.ipv4.conf.all.src_valid_mark=1
1818
- net.ipv6.conf.all.disable_ipv6=0
19+
- net.ipv6.conf.all.forwarding=1
1920
restart: always
2021
environment:
2122
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"

compose/docker-compose.reference.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
- net.ipv4.ip_forward=1
1616
- net.ipv4.conf.all.src_valid_mark=1
1717
- net.ipv6.conf.all.disable_ipv6=0
18+
- net.ipv6.conf.all.forwarding=1
1819
restart: always
1920
network_mode: host # Must configure with very particular settngs for host networking to work. Do not just set on!
2021
environment:

compose/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ services:
1616
- net.ipv4.ip_forward=1
1717
- net.ipv4.conf.all.src_valid_mark=1
1818
- net.ipv6.conf.all.disable_ipv6=0
19+
- net.ipv6.conf.all.forwarding=1
1920
restart: always
2021
environment:
2122
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"

logic/wireguard.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package logic
33
import (
44
"errors"
55
"fmt"
6+
"net"
67
"os"
78
"os/exec"
89
"strconv"
@@ -397,10 +398,16 @@ func setServerRoutes(iface, network string) {
397398
parentNetwork, err := GetParentNetwork(network)
398399
if err == nil {
399400
if parentNetwork.AddressRange != "" {
400-
local.SetCIDRRoute(iface, parentNetwork.AddressRange, nil)
401+
ip, cidr, err := net.ParseCIDR(parentNetwork.AddressRange)
402+
if err == nil {
403+
local.SetCIDRRoute(iface, ip.String(), cidr)
404+
}
401405
}
402406
if parentNetwork.AddressRange6 != "" {
403-
local.SetCIDRRoute(iface, parentNetwork.AddressRange6, nil)
407+
ip, cidr, err := net.ParseCIDR(parentNetwork.AddressRange6)
408+
if err == nil {
409+
local.SetCIDRRoute(iface, ip.String(), cidr)
410+
}
404411
}
405412
}
406413
}

0 commit comments

Comments
 (0)