diff options
Diffstat (limited to 'sys/net/raw_cb.c')
-rw-r--r-- | sys/net/raw_cb.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/net/raw_cb.c b/sys/net/raw_cb.c index 974db3afe78..e77da50b039 100644 --- a/sys/net/raw_cb.c +++ b/sys/net/raw_cb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_cb.c,v 1.11 2017/01/24 10:08:30 krw Exp $ */ +/* $OpenBSD: raw_cb.c,v 1.12 2017/07/03 19:23:47 claudio Exp $ */ /* $NetBSD: raw_cb.c,v 1.9 1996/02/13 22:00:39 christos Exp $ */ /* @@ -46,16 +46,10 @@ /* * Routines to manage the raw protocol control blocks. - * - * TODO: - * hash lookups by protocol family/protocol + address family - * take care of unique address problems per AF? - * redo address binding to allow wildcards */ u_long raw_sendspace = RAWSNDQ; u_long raw_recvspace = RAWRCVQ; -struct rawcbhead rawcb; /* * Allocate a control block and a nominal amount @@ -72,14 +66,13 @@ raw_attach(struct socket *so, int proto) * after space has been allocated for the * rawcb. */ - if (rp == 0) + if (rp == NULL) return (ENOBUFS); if ((error = soreserve(so, raw_sendspace, raw_recvspace)) != 0) return (error); rp->rcb_socket = so; rp->rcb_proto.sp_family = so->so_proto->pr_domain->dom_family; rp->rcb_proto.sp_protocol = proto; - LIST_INSERT_HEAD(&rawcb, rp, rcb_list); return (0); } @@ -94,7 +87,6 @@ raw_detach(struct rawcb *rp) so->so_pcb = 0; sofree(so); - LIST_REMOVE(rp, rcb_list); free((caddr_t)(rp), M_PCB, 0); } @@ -104,7 +96,6 @@ raw_detach(struct rawcb *rp) void raw_disconnect(struct rawcb *rp) { - if (rp->rcb_socket->so_state & SS_NOFDREF) raw_detach(rp); } |