diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-02-10 08:12:02 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-02-10 08:12:02 +0000 |
commit | 2ef40e3ef7415e30cd9826682bf4b21b93f22eff (patch) | |
tree | 90f76c939ccdb54c26893528df4dfbf3f6f143dc /sys/netinet6/in6_proto.c | |
parent | 8c58284f826425b6797eb7f698291a097414b7c7 (diff) |
rework gif to be more consistent.
while here, give us support for mpls in gif on ipv6.
this moves all the gif handling into if_gif, eg, the mpls handling
is no longer in ip_etherip.c.
ok claudio@
Diffstat (limited to 'sys/netinet6/in6_proto.c')
-rw-r--r-- | sys/netinet6/in6_proto.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 1435acc15c0..3be98fd1b9a 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_proto.c,v 1.101 2018/02/07 22:30:59 dlg Exp $ */ +/* $OpenBSD: in6_proto.c,v 1.102 2018/02/10 08:12:01 dlg Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -97,7 +97,6 @@ #include "gif.h" #if NGIF > 0 -#include <netinet/ip_ether.h> #include <net/if_gif.h> #endif @@ -277,6 +276,23 @@ const struct protosw inet6sw[] = { .pr_attach = rip6_attach, .pr_detach = rip6_detach, }, +#if defined(MPLS) && NGIF > 0 +{ + .pr_type = SOCK_RAW, + .pr_domain = &inet6domain, + .pr_protocol = IPPROTO_MPLS, + .pr_flags = PR_ATOMIC|PR_ADDR, +#if NGIF > 0 + .pr_input = in6_gif_input, +#else + .pr_input = ipip_input, +#endif + .pr_ctloutput = rip6_ctloutput, + .pr_usrreq = rip6_usrreq, /* XXX */ + .pr_attach = rip6_attach, + .pr_detach = rip6_detach, +}, +#endif /* MPLS */ #if NCARP > 0 { .pr_type = SOCK_RAW, |