From 071f86f9f1c961dd8169268ab4895d7ed7a350f0 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 3 Sep 2001 20:03:55 +0000 Subject: Patches from Keiichi SHIMA to make ip use the standard protosw structure again. Obtained from: Well, KAME I guess. --- sys/net/if_gif.c | 3 +-- sys/net/if_stf.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 8ad2c37..1bd3c5f 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -62,7 +62,6 @@ #include #include #include -#include #endif /* INET */ #ifdef INET6 @@ -101,7 +100,7 @@ static int gif_encapcheck __P((const struct mbuf *, int, int, void *)); #ifdef INET extern struct domain inetdomain; -struct ipprotosw in_gif_protosw = +struct protosw in_gif_protosw = { SOCK_RAW, &inetdomain, 0/*IPPROTO_IPV[46]*/, PR_ATOMIC|PR_ADDR, in_gif_input, rip_output, 0, rip_ctloutput, 0, diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index e9addd9..e6947a1 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -98,7 +98,6 @@ #include #include #include -#include #include #include @@ -134,7 +133,7 @@ static MALLOC_DEFINE(M_STF, "stf", "6to4 Tunnel Interface"); static int ip_stf_ttl = 40; extern struct domain inetdomain; -struct ipprotosw in_stf_protosw = +struct protosw in_stf_protosw = { SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR, in_stf_input, rip_output, 0, rip_ctloutput, 0, @@ -550,7 +549,7 @@ in_stf_input(m, va_alist) va_start(ap, m); off = va_arg(ap, int); - proto = va_arg(ap, int); + proto = mtod(m, struct ip *)->ip_p; va_end(ap); if (proto != IPPROTO_IPV6) { -- cgit v1.1