this allows us to bridge two ipv4 networks over an ipv6 link with gif. any objections? oks? the change was well tested by phessler.
diff --git netinet6/in6_proto.c netinet6/in6_proto.c index 7575055..8cf3de4 100644 --- netinet6/in6_proto.c +++ netinet6/in6_proto.c @@ -105,6 +105,7 @@ #include "gif.h" #if NGIF > 0 +#include <netinet/ip_ether.h> #include <netinet6/in6_gif.h> #endif @@ -195,7 +196,7 @@ struct ip6protosw inet6sw[] = { #endif /* IPSEC */ #if NGIF > 0 { 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, }, @@ -205,6 +206,11 @@ struct ip6protosw inet6sw[] = { rip6_usrreq, /* XXX */ 0, 0, 0, 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 +}, #endif /* INET */ #else /* NGIF */ { SOCK_RAW, &inet6domain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,