diff options
-rw-r--r-- | sys/netinet/ip_divert.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_divert.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 518cb0bab18..f44244f0f14 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_divert.c,v 1.4 2010/03/08 14:18:07 jsing Exp $ */ +/* $OpenBSD: ip_divert.c,v 1.5 2010/03/09 12:36:12 jsing Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -105,7 +105,7 @@ divert_output(struct mbuf *m, ...) if (sin->sin_addr.s_addr != INADDR_ANY) { ipaddr.sin_addr = sin->sin_addr; - ifa = ifa_ifwithaddr(sintosa(&ipaddr), 0); + ifa = ifa_ifwithaddr(sintosa(&ipaddr), m->m_pkthdr.rdomain); if (ifa == NULL) { divstat.divs_errors++; m_freem(m); diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c index c2ba973d0c4..b949f873e08 100644 --- a/sys/netinet6/ip6_divert.c +++ b/sys/netinet6/ip6_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_divert.c,v 1.2 2010/03/08 14:18:07 jsing Exp $ */ +/* $OpenBSD: ip6_divert.c,v 1.3 2010/03/09 12:36:12 jsing Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -110,7 +110,7 @@ divert6_output(struct mbuf *m, ...) if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { ip6addr.sin6_addr = sin6->sin6_addr; - ifa = ifa_ifwithaddr(sin6tosa(&ip6addr), 0); + ifa = ifa_ifwithaddr(sin6tosa(&ip6addr), m->m_pkthdr.rdomain); if (ifa == NULL) { div6stat.divs_errors++; m_freem(m); |