summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2019-12-30 14:52:00 +0000
committerbluhm <bluhm@openbsd.org>2019-12-30 14:52:00 +0000
commit290baf01706c6fefb14f14f8427a9310a2ee3521 (patch)
tree23ae24ac4807c17bf300a74f71ff3801540f763a
parentIn vcount() a safe loop over vnodes was commited to 4.4BSD in 1994. (diff)
downloadwireguard-openbsd-290baf01706c6fefb14f14f8427a9310a2ee3521.tar.xz
wireguard-openbsd-290baf01706c6fefb14f14f8427a9310a2ee3521.zip
The loopback check in ip6_input_if() was needless. The ::1 destination
address is in the routing table and will be identified as any other local address. There is no reason to handle ::1 source address special. Better use the generic IPv6 input path. Kame has removed the special code in their revision 1.189 commit. OK sashan@
-rw-r--r--sys/netinet6/ip6_input.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 94bf3011cd7..3dfa4f30599 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.223 2019/12/23 23:02:53 sashan Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.224 2019/12/30 14:52:00 bluhm Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -335,12 +335,6 @@ ip6_input_if(struct mbuf **mp, int *offp, int nxt, int af, struct ifnet *ifp)
goto bad;
}
- if (IN6_IS_ADDR_LOOPBACK(&ip6->ip6_src) ||
- IN6_IS_ADDR_LOOPBACK(&ip6->ip6_dst)) {
- nxt = ip6_ours(mp, offp, nxt, af);
- goto out;
- }
-
#if NPF > 0
if (pf_ouraddr(m) == 1) {
nxt = ip6_ours(mp, offp, nxt, af);