summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_divert.c20
-rw-r--r--sys/netinet6/ip6_divert.h3
2 files changed, 8 insertions, 15 deletions
diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c
index f66f64acf7a..08b42fe5565 100644
--- a/sys/netinet6/ip6_divert.c
+++ b/sys/netinet6/ip6_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_divert.c,v 1.21 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: ip6_divert.c,v 1.22 2014/04/23 14:43:14 florian Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -63,7 +63,9 @@ int divb6hashsize = DIVERTHASHSIZE;
static struct sockaddr_in6 ip6addr = { sizeof(ip6addr), AF_INET6 };
-void divert6_detach(struct inpcb *);
+void divert6_detach(struct inpcb *);
+int divert6_output(struct inpcb *, struct mbuf *, struct mbuf *,
+ struct mbuf *);
void
divert6_init()
@@ -80,26 +82,18 @@ divert6_input(struct mbuf **mp, int *offp, int proto)
}
int
-divert6_output(struct mbuf *m, ...)
+divert6_output(struct inpcb *inp, struct mbuf *m, struct mbuf *nam,
+ struct mbuf *control)
{
- struct inpcb *inp;
struct ifqueue *inq;
- struct mbuf *nam, *control;
struct sockaddr_in6 *sin6;
struct socket *so;
struct ifaddr *ifa;
int s, error = 0, p_hdrlen = 0, nxt = 0, off;
- va_list ap;
struct ip6_hdr *ip6;
u_int16_t csum = 0;
size_t p_off = 0;
- va_start(ap, m);
- inp = va_arg(ap, struct inpcb *);
- nam = va_arg(ap, struct mbuf *);
- control = va_arg(ap, struct mbuf *);
- va_end(ap);
-
m->m_pkthdr.rcvif = NULL;
m->m_nextpkt = NULL;
m->m_pkthdr.ph_rtableid = inp->inp_rtableid;
@@ -321,7 +315,7 @@ divert6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr,
break;
case PRU_SEND:
- return (divert6_output(m, inp, addr, control));
+ return (divert6_output(inp, m, addr, control));
case PRU_ABORT:
soisdisconnected(so);
diff --git a/sys/netinet6/ip6_divert.h b/sys/netinet6/ip6_divert.h
index 5375dbc81d7..2b5159de885 100644
--- a/sys/netinet6/ip6_divert.h
+++ b/sys/netinet6/ip6_divert.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_divert.h,v 1.3 2013/10/25 02:53:31 deraadt Exp $ */
+/* $OpenBSD: ip6_divert.h,v 1.4 2014/04/23 14:43:14 florian Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -56,7 +56,6 @@ extern struct div6stat div6stat;
void divert6_init(void);
int divert6_input(struct mbuf **, int *, int);
int divert6_packet(struct mbuf *, int);
-int divert6_output(struct mbuf *, ...);
int divert6_sysctl(int *, u_int, void *, size_t *, void *, size_t);
int divert6_usrreq(struct socket *,
int, struct mbuf *, struct mbuf *, struct mbuf *, struct proc *);