summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/uipc_proto.c4
-rw-r--r--sys/net/pfkey.c4
-rw-r--r--sys/net/raw_cb.h3
-rw-r--r--sys/net/raw_usrreq.c78
-rw-r--r--sys/netinet/raw_ip.c7
-rw-r--r--sys/netinet6/raw_ip6.c7
6 files changed, 8 insertions, 95 deletions
diff --git a/sys/kern/uipc_proto.c b/sys/kern/uipc_proto.c
index a7ac6bf5ce2..e67337fc176 100644
--- a/sys/kern/uipc_proto.c
+++ b/sys/kern/uipc_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_proto.c,v 1.9 2016/09/05 15:12:29 claudio Exp $ */
+/* $OpenBSD: uipc_proto.c,v 1.10 2017/01/23 16:31:24 bluhm Exp $ */
/* $NetBSD: uipc_proto.c,v 1.8 1996/02/13 21:10:47 christos Exp $ */
/*-
@@ -65,7 +65,7 @@ struct protosw unixsw[] = {
0, 0, 0, 0,
},
{ 0, 0, 0, 0,
- raw_input, 0, 0, 0,
+ 0, 0, 0, 0,
raw_usrreq,
raw_init, 0, 0, 0,
}
diff --git a/sys/net/pfkey.c b/sys/net/pfkey.c
index 561e64e6f99..c6c50b7c6b7 100644
--- a/sys/net/pfkey.c
+++ b/sys/net/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.34 2017/01/13 08:52:09 mpi Exp $ */
+/* $OpenBSD: pfkey.c,v 1.35 2017/01/23 16:31:24 bluhm Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -270,7 +270,7 @@ static struct protosw pfkey_protosw_template = {
&pfkeydomain,
-1, /* protocol */
PR_ATOMIC | PR_ADDR,
- (void *) raw_input,
+ NULL, /* input */
(void *) pfkey_output,
NULL, /* ctlinput */
NULL, /* ctloutput */
diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h
index c39ded3fd28..f08d75c128e 100644
--- a/sys/net/raw_cb.h
+++ b/sys/net/raw_cb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_cb.h,v 1.10 2016/09/05 15:12:30 claudio Exp $ */
+/* $OpenBSD: raw_cb.h,v 1.11 2017/01/23 16:31:24 bluhm Exp $ */
/* $NetBSD: raw_cb.h,v 1.9 1996/02/13 22:00:41 christos Exp $ */
/*
@@ -62,7 +62,6 @@ int raw_attach(struct socket *, int);
void raw_detach(struct rawcb *);
void raw_disconnect(struct rawcb *);
void raw_init(void);
-void raw_input(struct mbuf *, ...);
int raw_usrreq(struct socket *,
int, struct mbuf *, struct mbuf *, struct mbuf *, struct proc *);
#endif /* _KERNEL */
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c
index 32047c97c65..5e30b5780a5 100644
--- a/sys/net/raw_usrreq.c
+++ b/sys/net/raw_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_usrreq.c,v 1.27 2016/12/19 08:36:49 mpi Exp $ */
+/* $OpenBSD: raw_usrreq.c,v 1.28 2017/01/23 16:31:24 bluhm Exp $ */
/* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */
/*
@@ -55,82 +55,6 @@ raw_init(void)
LIST_INIT(&rawcb);
}
-
-/*
- * Raw protocol input routine. Find the socket
- * associated with the packet(s) and move them over. If
- * nothing exists for this packet, drop it.
- */
-/*
- * Raw protocol interface.
- */
-void
-raw_input(struct mbuf *m0, ...)
-{
- struct rawcb *rp;
- struct mbuf *m = m0;
- int sockets = 0;
- struct socket *last;
- va_list ap;
- struct sockproto *proto;
- struct sockaddr *src, *dst;
-
- va_start(ap, m0);
- proto = va_arg(ap, struct sockproto *);
- src = va_arg(ap, struct sockaddr *);
- dst = va_arg(ap, struct sockaddr *);
- va_end(ap);
-
- last = 0;
- LIST_FOREACH(rp, &rawcb, rcb_list) {
- if (rp->rcb_socket->so_state & SS_CANTRCVMORE)
- continue;
- if (rp->rcb_proto.sp_family != proto->sp_family)
- continue;
- if (rp->rcb_proto.sp_protocol &&
- rp->rcb_proto.sp_protocol != proto->sp_protocol)
- continue;
- /*
- * We assume the lower level routines have
- * placed the address in a canonical format
- * suitable for a structure comparison.
- *
- * Note that if the lengths are not the same
- * the comparison will fail at the first byte.
- */
-#define equal(a1, a2) \
- (bcmp((caddr_t)(a1), (caddr_t)(a2), a1->sa_len) == 0)
- if (rp->rcb_laddr && !equal(rp->rcb_laddr, dst))
- continue;
- if (rp->rcb_faddr && !equal(rp->rcb_faddr, src))
- continue;
- if (last) {
- struct mbuf *n;
- if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) != NULL) {
- if (sbappendaddr(&last->so_rcv, src,
- n, (struct mbuf *)NULL) == 0)
- /* should notify about lost packet */
- m_freem(n);
- else {
- sorwakeup(last);
- sockets++;
- }
- }
- }
- last = rp->rcb_socket;
- }
- if (last) {
- if (sbappendaddr(&last->so_rcv, src,
- m, (struct mbuf *)NULL) == 0)
- m_freem(m);
- else {
- sorwakeup(last);
- sockets++;
- }
- } else
- m_freem(m);
-}
-
int
raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
struct mbuf *control, struct proc *p)
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 0282e35682d..0ee9070c5e3 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.91 2017/01/10 09:01:18 mpi Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.92 2017/01/23 16:31:24 bluhm Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -115,11 +115,6 @@ rip_init(void)
struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
-/*
- * Setup generic address and protocol structures
- * for raw_input routine, then pass them along with
- * mbuf chain.
- */
void
rip_input(struct mbuf *m, ...)
{
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 0bf46188860..9b217f42aa1 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.c,v 1.102 2017/01/10 09:01:18 mpi Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.103 2017/01/23 16:31:24 bluhm Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
@@ -115,11 +115,6 @@ rip6_init(void)
in_pcbinit(&rawin6pcbtable, 1);
}
-/*
- * Setup generic address and protocol structures
- * for raw_input routine, then pass them along with
- * mbuf chain.
- */
int
rip6_input(struct mbuf **mp, int *offp, int proto)
{