diff options
author | 2000-06-20 04:17:31 +0000 | |
---|---|---|
committer | 2000-06-20 04:17:31 +0000 | |
commit | c18180ac4a8aab5055bb1ba79f9f09b170c218c4 (patch) | |
tree | e79de1bf04b431e402267a69b78023582f3b637b | |
parent | Don't log ipf info in /var/log/messages. Fixes PR 1171 (diff) | |
download | wireguard-openbsd-c18180ac4a8aab5055bb1ba79f9f09b170c218c4.tar.xz wireguard-openbsd-c18180ac4a8aab5055bb1ba79f9f09b170c218c4.zip |
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.c | 6 |
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 } } |