summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_input.c
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2019-12-23 22:33:58 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2019-12-23 22:33:58 +0000
commit65e966c98bdeba0261ad05ba0848eb069611942f (patch)
tree2ae3102ef192a34d6a1056b9bc116da1eea850e8 /sys/netinet6/ip6_input.c
parent65ed1958adb148e68a411bf35991e10487f30364 (diff)
rdr-to with loopback destination should work even though
IP forwarding is disabled. Issue reported by Daniel Jakots (danj@) OK bluhm@
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r--sys/netinet6/ip6_input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 5404d7ccfb4..25d267c00b1 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.221 2019/12/08 11:08:22 sashan Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.222 2019/12/23 22:33:57 sashan Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -435,7 +435,8 @@ ip6_input_if(struct mbuf **mp, int *offp, int nxt, int af, struct ifnet *ifp)
if (ip6_forwarding == 0 && rt->rt_ifidx != ifp->if_index &&
!((ifp->if_flags & IFF_LOOPBACK) ||
- (ifp->if_type == IFT_ENC))) {
+ (ifp->if_type == IFT_ENC)) ||
+ (m->m_pkthdr.pf.flags & PF_TAG_TRANSLATE_LOCALHOST)) {
/* received on wrong interface */
#if NCARP > 0
struct ifnet *out_if;