aboutsummaryrefslogtreecommitdiffstats
path: root/src/routing.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-06-29 14:39:21 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-06-29 14:39:21 +0200
commit7e185db1418635a28e5aacbd17b1f17b9ab89e35 (patch)
treee617d1dbca6c3d45207f9db145ec270bf8496132 /src/routing.go
parentWork on UAPI (diff)
downloadwireguard-go-7e185db1418635a28e5aacbd17b1f17b9ab89e35.tar.xz
wireguard-go-7e185db1418635a28e5aacbd17b1f17b9ab89e35.zip
Completed get/set configuration
For debugging of "outbound flow" Mostly, a few things still missing
Diffstat (limited to 'src/routing.go')
-rw-r--r--src/routing.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routing.go b/src/routing.go
index 6a5e1f3..2a2e237 100644
--- a/src/routing.go
+++ b/src/routing.go
@@ -16,9 +16,9 @@ func (table *RoutingTable) AllowedIPs(peer *Peer) []net.IPNet {
table.mutex.RLock()
defer table.mutex.RUnlock()
- allowed := make([]net.IPNet, 10)
- table.IPv4.AllowedIPs(peer, allowed)
- table.IPv6.AllowedIPs(peer, allowed)
+ allowed := make([]net.IPNet, 0, 10)
+ allowed = table.IPv4.AllowedIPs(peer, allowed)
+ allowed = table.IPv6.AllowedIPs(peer, allowed)
return allowed
}