summaryrefslogtreecommitdiffstats
path: root/device/send.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-06-03 16:12:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-06-03 16:29:43 +0200
commit841756e328c743fec624e9259921ea6d815911d5 (patch)
tree6b31dc3cd2e7b6e86c38ed6a1b7a36c326ef064d /device/send.go
parentdevice: remove nodes by peer in O(1) instead of O(n) (diff)
downloadwireguard-go-841756e328c743fec624e9259921ea6d815911d5.tar.xz
wireguard-go-841756e328c743fec624e9259921ea6d815911d5.zip
device: simplify allowedips lookup signature
The inliner should handle this for us. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--device/send.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/device/send.go b/device/send.go
index a4f07e4..b05c69e 100644
--- a/device/send.go
+++ b/device/send.go
@@ -254,14 +254,14 @@ func (device *Device) RoutineReadFromTUN() {
continue
}
dst := elem.packet[IPv4offsetDst : IPv4offsetDst+net.IPv4len]
- peer = device.allowedips.LookupIPv4(dst)
+ peer = device.allowedips.Lookup(dst)
case ipv6.Version:
if len(elem.packet) < ipv6.HeaderLen {
continue
}
dst := elem.packet[IPv6offsetDst : IPv6offsetDst+net.IPv6len]
- peer = device.allowedips.LookupIPv6(dst)
+ peer = device.allowedips.Lookup(dst)
default:
device.log.Verbosef("Received packet with unknown IP version")