summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ah_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/ah_input.c')
-rw-r--r--sys/netinet6/ah_input.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c
index 4ee2a99..63605d0 100644
--- a/sys/netinet6/ah_input.c
+++ b/sys/netinet6/ah_input.c
@@ -97,13 +97,9 @@
extern struct protosw inetsw[];
void
-#if __STDC__
-ah4_input(struct mbuf *m, ...)
-#else
-ah4_input(m, va_alist)
+ah4_input(m, off)
struct mbuf *m;
- va_dcl
-#endif
+ int off;
{
struct ip *ip;
struct ah *ah;
@@ -115,15 +111,9 @@ ah4_input(m, va_alist)
struct secasvar *sav = NULL;
u_int16_t nxt;
size_t hlen;
- int off, proto;
- va_list ap;
+ int proto;
size_t stripsiz = 0;
- va_start(ap, m);
- off = va_arg(ap, int);
- proto = mtod(m, struct ip *)->ip_p;
- va_end(ap);
-
#ifndef PULLDOWN_TEST
if (m->m_len < off + sizeof(struct newah)) {
m = m_pullup(m, off + sizeof(struct newah));
@@ -136,9 +126,11 @@ ah4_input(m, va_alist)
}
ip = mtod(m, struct ip *);
+ proto = ip->ip_p;
ah = (struct ah *)(((caddr_t)ip) + off);
#else
ip = mtod(m, struct ip *);
+ proto = ip->ip_p;
IP6_EXTHDR_GET(ah, struct ah *, m, off, sizeof(struct newah));
if (ah == NULL) {
ipseclog((LOG_DEBUG, "IPv4 AH input: can't pullup;"
OpenPOWER on IntegriCloud