summaryrefslogtreecommitdiff
path: root/sys/netinet/ipsec_input.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-25 07:09:44 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-25 07:09:44 +0000
commit3a07de35f8cbb40c0d89df12d80bfbc4de0bcb6a (patch)
treebce79d979890ed81a8b555a6e5eddff5ccf0022b /sys/netinet/ipsec_input.c
parent094791be4d235c40b2f3721658af000361b03dac (diff)
Change some function prototypes, dont unnecessarily initialize some
variables.
Diffstat (limited to 'sys/netinet/ipsec_input.c')
-rw-r--r--sys/netinet/ipsec_input.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c
index b9921bda314..aada36e372e 100644
--- a/sys/netinet/ipsec_input.c
+++ b/sys/netinet/ipsec_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_input.c,v 1.1 1999/12/09 10:15:23 angelos Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.2 1999/12/25 07:09:43 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -569,34 +569,42 @@ esp_input(struct mbuf *m, ...)
#ifdef INET6
/* IPv6 AH wrapper */
-void
+int
ah6_input(struct mbuf *m, ...)
{
- int skip, protoff;
+ int *skip, protoff;
va_list ap;
va_start(ap, m);
- skip = va_arg(ap, int);
+ skip = va_arg(ap, int *);
protoff = va_arg(ap, int);
va_end(ap);
- ipsec_common_input(m, skip, protoff, AF_INET6, IPPROTO_AH);
+ ipsec_common_input(m, *skip, protoff, AF_INET6, IPPROTO_AH);
+
+ /* Retrieve new protocol */
+ m_copydata(m, protoff, sizeof(u_int8_t), (caddr_t) &protoff);
+ return protoff;
}
/* IPv6 ESP wrapper */
-void
+int
esp6_input(struct mbuf *m, ...)
{
- int skip, protoff;
+ int *skip, protoff;
va_list ap;
va_start(ap, m);
- skip = va_arg(ap, int);
+ skip = va_arg(ap, int *);
protoff = va_arg(ap, int);
va_end(ap);
- ipsec_common_input(m, skip, protoff, AF_INET6, IPPROTO_ESP);
+ ipsec_common_input(m, *skip, protoff, AF_INET6, IPPROTO_ESP);
+
+ /* Retrieve new protocol */
+ m_copydata(m, protoff, sizeof(u_int8_t), (caddr_t) &protoff);
+ return protoff;
}
#endif /* INET6 */