summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2011-04-03 16:09:10 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2011-04-03 16:09:10 +0000
commit98c89a5a903623639906d73ae1bef4ffada7791a (patch)
treedd780ff2abe3aec9d10f6c33e6e464147086317f
parent55d0786714b356261f264952a8ea994ba5b1bffe (diff)
Don't attempt to enqueue mbufs on sockets marked as SS_CANTRCVMORE, as
was done earlier for routing sockets. ok claudio@
-rw-r--r--sys/net/raw_usrreq.c4
-rw-r--r--sys/netinet/raw_ip.c4
-rw-r--r--sys/netinet/udp_usrreq.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c
index b9cbdb5f7b1..d3ba8015ec9 100644
--- a/sys/net/raw_usrreq.c
+++ b/sys/net/raw_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_usrreq.c,v 1.12 2009/11/13 20:54:05 claudio Exp $ */
+/* $OpenBSD: raw_usrreq.c,v 1.13 2011/04/03 16:09:09 blambert Exp $ */
/* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */
/*
@@ -85,6 +85,8 @@ raw_input(struct mbuf *m0, ...)
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 &&
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index ee21b1da104..6cce2c68375 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.50 2010/09/08 08:34:42 claudio Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.51 2011/04/03 16:09:09 blambert Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -128,6 +128,8 @@ rip_input(struct mbuf *m, ...)
ripsrc.sin_addr = ip->ip_src;
CIRCLEQ_FOREACH(inp, &rawcbtable.inpt_queue, inp_queue) {
+ if (inp->inp_socket->so_state & SS_CANTRCVMORE)
+ continue;
#ifdef INET6
if (inp->inp_flags & INP_IPV6)
continue;
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 1fa7d064d26..6db0e712d09 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.138 2010/09/24 14:50:30 hsuenaga Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.139 2011/04/03 16:09:09 blambert Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -442,6 +442,8 @@ udp_input(struct mbuf *m, ...)
*/
last = NULL;
CIRCLEQ_FOREACH(inp, &udbtable.inpt_queue, inp_queue) {
+ if (inp->inp_socket->so_state & SS_CANTRCVMORE)
+ continue;
#ifdef INET6
/* don't accept it if AF does not match */
if (ip6 && !(inp->inp_flags & INP_IPV6))