hardcode in a /22 until fixed correctly

This commit is contained in:
Callan Bryant 2020-10-19 00:15:42 +01:00
parent d1d0113832
commit a361bffa3c
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

6
add.go
View File

@ -8,8 +8,10 @@ import (
"time"
)
// TODO -- replace hardcoded /22 with one derived from conf.Network
const wgQuickPeerConf = `[Interface]
Address = {{ .Peer.IP }}
Address = {{ .Peer.IP }}/22
PrivateKey={{ .Peer.PrivateKey.Key }}
{{- if .DsnetConfig.DNS }}
DNS = {{ .DsnetConfig.DNS }}
@ -26,7 +28,7 @@ PersistentKeepalive={{ .Keepalive }}
const vyattaPeerConf = `[Interface]
configure
set interfaces wireguard dsnet address {{ .Peer.IP }}
set interfaces wireguard dsnet address {{ .Peer.IP }}/22
set interfaces wireguard dsnet route-allowed-ips true
set interfaces wireguard dsnet peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} endpoint {{ .DsnetConfig.ExternalIP }}:{{ .DsnetConfig.ListenPort }}