summaryrefslogtreecommitdiffhomepage
path: root/device/receive.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/receive.go
parentc382222eab9e3814f4df75fd25f8e9e31484b5e0 (diff)
device: simplify allowedips lookup signature
The inliner should handle this for us. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/receive.go')
-rw-r--r--device/receive.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/device/receive.go b/device/receive.go
index 1182246..5857481 100644
--- a/device/receive.go
+++ b/device/receive.go
@@ -447,7 +447,7 @@ func (peer *Peer) RoutineSequentialReceiver() {
}
elem.packet = elem.packet[:length]
src := elem.packet[IPv4offsetSrc : IPv4offsetSrc+net.IPv4len]
- if device.allowedips.LookupIPv4(src) != peer {
+ if device.allowedips.Lookup(src) != peer {
device.log.Verbosef("IPv4 packet with disallowed source address from %v", peer)
goto skip
}
@@ -464,7 +464,7 @@ func (peer *Peer) RoutineSequentialReceiver() {
}
elem.packet = elem.packet[:length]
src := elem.packet[IPv6offsetSrc : IPv6offsetSrc+net.IPv6len]
- if device.allowedips.LookupIPv6(src) != peer {
+ if device.allowedips.Lookup(src) != peer {
device.log.Verbosef("IPv6 packet with disallowed source address from %v", peer)
goto skip
}