summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-06-20 04:17:32 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-06-20 04:17:32 +0000
commit0f517e60acc513cc3974ca8a4bd23500025c2215 (patch)
tree44e0525ddebd43155e7fa105b5bd51f9d722807c
parent3a969de42ca804556e7c7c9a1fc12fb63c3a12e6 (diff)
initialize mtu/hlim for enc interface at encattach().
backgronud: inbound ipsec packet will have enc* as m->m_pkthdr.rcvif. when we try to reflect the packet back in the kernel (like icmp6 echo), we'd generate packet toward enc* interface. icmp6_reflect() will take hoplimit value from nd_ifinfo[enc*], which was not initialized by the old code. XXX the change to m->m_pkthdr.rcvif violates IPv6 scoped routing. we will need to disable it, for at least IPv6.
-rw-r--r--sys/net/if_enc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c
index d14613a9223..7c6d06a699f 100644
--- a/sys/net/if_enc.c
+++ b/sys/net/if_enc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_enc.c,v 1.30 2000/04/18 06:41:23 angelos Exp $ */
+/* $OpenBSD: if_enc.c,v 1.31 2000/06/20 04:17:31 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -71,6 +71,7 @@
#endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
#endif /* INET6 */
#ifdef ISO
@@ -130,6 +131,9 @@ encattach(int nenc)
#if NBPFILTER > 0
bpfattach(&encif[i].sc_if.if_bpf, ifp, DLT_ENC, ENC_HDRLEN);
#endif
+#ifdef INET6
+ nd6_ifattach(ifp);
+#endif
}
}