diff options
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 } |