mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 21:24:16 +08:00
fixing ipv6
This commit is contained in:
parent
2e4ae94521
commit
80cc86783d
6 changed files with 14 additions and 2 deletions
|
@ -16,6 +16,7 @@ services:
|
|||
- net.ipv4.ip_forward=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
- net.ipv6.conf.all.forwarding=1
|
||||
restart: always
|
||||
environment:
|
||||
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"
|
||||
|
|
|
@ -16,6 +16,7 @@ services:
|
|||
- net.ipv4.ip_forward=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
- net.ipv6.conf.all.forwarding=1
|
||||
restart: always
|
||||
environment:
|
||||
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"
|
||||
|
|
|
@ -16,6 +16,7 @@ services:
|
|||
- net.ipv4.ip_forward=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
- net.ipv6.conf.all.forwarding=1
|
||||
restart: always
|
||||
environment:
|
||||
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"
|
||||
|
|
|
@ -15,6 +15,7 @@ services:
|
|||
- net.ipv4.ip_forward=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
- net.ipv6.conf.all.forwarding=1
|
||||
restart: always
|
||||
network_mode: host # Must configure with very particular settngs for host networking to work. Do not just set on!
|
||||
environment:
|
||||
|
|
|
@ -16,6 +16,7 @@ services:
|
|||
- net.ipv4.ip_forward=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
- net.ipv6.conf.all.forwarding=1
|
||||
restart: always
|
||||
environment:
|
||||
SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"
|
||||
|
|
|
@ -3,6 +3,7 @@ package logic
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
|
@ -397,10 +398,16 @@ func setServerRoutes(iface, network string) {
|
|||
parentNetwork, err := GetParentNetwork(network)
|
||||
if err == nil {
|
||||
if parentNetwork.AddressRange != "" {
|
||||
local.SetCIDRRoute(iface, parentNetwork.AddressRange, nil)
|
||||
ip, cidr, err := net.ParseCIDR(parentNetwork.AddressRange)
|
||||
if err == nil {
|
||||
local.SetCIDRRoute(iface, ip.String(), cidr)
|
||||
}
|
||||
}
|
||||
if parentNetwork.AddressRange6 != "" {
|
||||
local.SetCIDRRoute(iface, parentNetwork.AddressRange6, nil)
|
||||
ip, cidr, err := net.ParseCIDR(parentNetwork.AddressRange6)
|
||||
if err == nil {
|
||||
local.SetCIDRRoute(iface, ip.String(), cidr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue