summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2012-03-15 14:11:57 +0000
committermikeb <mikeb@openbsd.org>2012-03-15 14:11:57 +0000
commit1f27ca9223e050b56432f9cb818c8f3ff9f2b0af (patch)
treec801244917edb810ea05f9a2bb87161c921edc45
parentSend secondary DA to terminals with XT in terminfo when starting up and (diff)
downloadwireguard-openbsd-1f27ca9223e050b56432f9cb818c8f3ff9f2b0af.tar.xz
wireguard-openbsd-1f27ca9223e050b56432f9cb818c8f3ff9f2b0af.zip
Direct IPv6 packets with Ethernet encapsulation into the appropriate
input routine allowing us to bridge two IPv4 networks over an IPv6 link with gif(4). ok henning, sthen, ok and tests phessler, "lets get this in!" todd
-rw-r--r--sys/netinet6/in6_proto.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index 75750557e8e..a0314f50899 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_proto.c,v 1.62 2011/03/31 10:36:42 jasper Exp $ */
+/* $OpenBSD: in6_proto.c,v 1.63 2012/03/15 14:11:57 mikeb Exp $ */
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
/*
@@ -105,6 +105,7 @@
#include "gif.h"
#if NGIF > 0
+#include <netinet/ip_ether.h>
#include <netinet6/in6_gif.h>
#endif
@@ -194,8 +195,13 @@ struct ip6protosw inet6sw[] = {
},
#endif /* IPSEC */
#if NGIF > 0
+{ SOCK_RAW, &inet6domain, IPPROTO_ETHERIP,PR_ATOMIC|PR_ADDR,
+ etherip_input6, rip6_output, 0, rip6_ctloutput,
+ rip6_usrreq,
+ 0, 0, 0, 0, etherip_sysctl
+},
{ SOCK_RAW, &inet6domain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,
- in6_gif_input, rip6_output, 0, rip6_ctloutput,
+ in6_gif_input, rip6_output, 0, rip6_ctloutput,
rip6_usrreq, /* XXX */
0, 0, 0, 0,
},