diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-29 14:39:21 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-06-29 14:39:21 +0200 |
commit | 7e185db1418635a28e5aacbd17b1f17b9ab89e35 (patch) | |
tree | e617d1dbca6c3d45207f9db145ec270bf8496132 /src/routing.go | |
parent | 1f0976a26c1d0a6b5eb2c0aa993f12d89f96eed2 (diff) |
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.go | 6 |
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 } |