From 112379c70aa548e006e041463233cd01062b3298 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Tue, 27 Oct 2020 22:00:21 +0000 Subject: [PATCH] remove redundant allowed IP enumeration --- add.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/add.go b/add.go index a11f4f7..9452bd9 100644 --- a/add.go +++ b/add.go @@ -125,18 +125,6 @@ func Add() { } func PrintPeerCfg(peer PeerConfig, conf *DsnetConfig) { - allowedIPs := make([]JSONIPNet, 0, len(conf.Networks)+2) - - if len(conf.Network.IPNet.Mask) > 0 { - allowedIPs = append(allowedIPs, conf.Network) - } - - if len(conf.Network6.IPNet.Mask) > 0 { - allowedIPs = append(allowedIPs, conf.Network6) - } - - allowedIPs = append(allowedIPs, conf.Networks...) - var peerConf string switch os.Getenv("DSNET_OUTPUT") {