add CIDR subnet properly
This commit is contained in:
parent
e7da49c1a8
commit
7bbe28a145
9
add.go
9
add.go
@ -3,6 +3,7 @@ package dsnet
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"net"
|
||||
"text/template"
|
||||
"time"
|
||||
)
|
||||
@ -123,6 +124,14 @@ func PrintPeerCfg(peer PeerConfig, conf *DsnetConfig) {
|
||||
"Keepalive": time.Duration(KEEPALIVE).Seconds(),
|
||||
"AllowedIPs": allowedIPs,
|
||||
"Cidrmask": cidrmask,
|
||||
"Address": net.IPNet{
|
||||
IP: peer.IP,
|
||||
Mask: conf.Network.IPNet.Mask,
|
||||
},
|
||||
"Address6": net.IPNet{
|
||||
IP: peer.IP6,
|
||||
Mask: conf.Network6.IPNet.Mask,
|
||||
},
|
||||
})
|
||||
check(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user