summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-03 20:03:55 +0000
committerjulian <julian@FreeBSD.org>2001-09-03 20:03:55 +0000
commit071f86f9f1c961dd8169268ab4895d7ed7a350f0 (patch)
tree8d09274631c646d1bfce4acc158d08cc765103da /sys/netinet6
parentb278777ba611a10a308ea300780edcc62fdb7d3d (diff)
downloadFreeBSD-src-071f86f9f1c961dd8169268ab4895d7ed7a350f0.zip
FreeBSD-src-071f86f9f1c961dd8169268ab4895d7ed7a350f0.tar.gz
Patches from Keiichi SHIMA <keiichi@iij.ad.jp>
to make ip use the standard protosw structure again. Obtained from: Well, KAME I guess.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ah_input.c7
-rw-r--r--sys/netinet6/esp_input.c7
-rw-r--r--sys/netinet6/ipcomp_input.c7
3 files changed, 9 insertions, 12 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c
index 070883e..4ee2a99 100644
--- a/sys/netinet6/ah_input.c
+++ b/sys/netinet6/ah_input.c
@@ -94,8 +94,7 @@
#define IPLEN_FLIPPED
#ifdef INET
-#include <netinet/ipprotosw.h>
-extern struct ipprotosw inetsw[];
+extern struct protosw inetsw[];
void
#if __STDC__
@@ -122,7 +121,7 @@ ah4_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);
#ifndef PULLDOWN_TEST
@@ -550,7 +549,7 @@ ah4_input(m, va_alist)
ipsecstat.in_polvio++;
goto fail;
}
- (*inetsw[ip_protox[nxt]].pr_input)(m, off, nxt);
+ (*inetsw[ip_protox[nxt]].pr_input)(m, off);
} else
m_freem(m);
m = NULL;
diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c
index 4542f13..af12ec0 100644
--- a/sys/netinet6/esp_input.c
+++ b/sys/netinet6/esp_input.c
@@ -97,8 +97,7 @@
? sizeof(struct newesp) : sizeof(struct esp))
#ifdef INET
-#include <netinet/ipprotosw.h>
-extern struct ipprotosw inetsw[];
+extern struct protosw inetsw[];
void
#if __STDC__
@@ -125,7 +124,7 @@ esp4_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);
/* sanity check for alignment. */
@@ -445,7 +444,7 @@ noreplaycheck:
ipsecstat.in_polvio++;
goto bad;
}
- (*inetsw[ip_protox[nxt]].pr_input)(m, off, nxt);
+ (*inetsw[ip_protox[nxt]].pr_input)(m, off);
} else
m_freem(m);
m = NULL;
diff --git a/sys/netinet6/ipcomp_input.c b/sys/netinet6/ipcomp_input.c
index 0a6e2f5..f3143d2 100644
--- a/sys/netinet6/ipcomp_input.c
+++ b/sys/netinet6/ipcomp_input.c
@@ -83,8 +83,7 @@
#define IPLEN_FLIPPED
#ifdef INET
-#include <netinet/ipprotosw.h>
-extern struct ipprotosw inetsw[];
+extern struct protosw inetsw[];
void
#if __STDC__
@@ -110,7 +109,7 @@ ipcomp4_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 (m->m_pkthdr.len < off + sizeof(struct ipcomp)) {
@@ -231,7 +230,7 @@ ipcomp4_input(m, va_alist)
ipsecstat.in_polvio++;
goto fail;
}
- (*inetsw[ip_protox[nxt]].pr_input)(m, off, nxt);
+ (*inetsw[ip_protox[nxt]].pr_input)(m, off);
} else
m_freem(m);
m = NULL;
OpenPOWER on IntegriCloud