summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-06-24 13:55:14 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-06-24 13:55:14 +0000
commit7b30f9a4bd6677798105c35184ba72545c354046 (patch)
tree2ad0e33645e3839069ecbb809efeadb091c0345b /sys/net
parent40ed16b97cabe2f194df0c265683615929570102 (diff)
in the ipv6 case, allow route-to to route to link-local addresses
from KOZUKA Masahiro <ma-kun@kozuka.jp> with a minor adjustment from itojun ok itojun@ dhartmei@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 2bde791bebe..3fe66da7096 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.368 2003/06/24 13:52:50 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.369 2003/06/24 13:55:13 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -77,6 +77,7 @@
#include <netinet/ip6.h>
#include <netinet/in_pcb.h>
#include <netinet/icmp6.h>
+#include <netinet6/nd6.h>
#endif /* INET6 */
#ifdef ALTQ
@@ -4647,9 +4648,10 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
* If the packet is too large for the outgoing interface,
* send back an icmp6 error.
*/
+ if (IN6_IS_ADDR_LINKLOCAL(&dst->sin6_addr))
+ dst->sin6_addr.s6_addr16[1] = htons(ifp->if_index);
if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu) {
- error = (*ifp->if_output)(ifp, m0, (struct sockaddr *)dst,
- NULL);
+ error = nd6_output(ifp, ifp, m0, dst, NULL);
} else {
in6_ifstat_inc(ifp, ifs6_in_toobig);
if (r->rt != PF_DUPTO)