summaryrefslogtreecommitdiffstats
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-08-27 18:33:08 +0000
committerandre <andre@FreeBSD.org>2004-08-27 18:33:08 +0000
commit21264022388cc795478511d03b72ddc0ce213c5b (patch)
tree5e40bb2ff1fccfd1425f4b8ada947f22f8df6605 /sys/net/if_spppsubr.c
parent4e16b35c5bbfa63f8794131592ae3b1ac4d05cfd (diff)
downloadFreeBSD-src-21264022388cc795478511d03b72ddc0ce213c5b.zip
FreeBSD-src-21264022388cc795478511d03b72ddc0ce213c5b.tar.gz
Apply error and success logic consistently to the function netisr_queue() and
its users. netisr_queue() now returns (0) on success and ERRNO on failure. At the moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full) are supported. Previously it would return (1) on success but the return value of IF_HANDOFF() was interpreted wrongly and (0) was actually returned on success. Due to this schednetisr() was never called to kick the scheduling of the isr. However this was masked by other normal packets coming through netisr_dispatch() causing the dequeueing of waiting packets. PR: kern/70988 Found by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> MFC after: 3 days
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 4c9f304..7101975 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -715,7 +715,7 @@ sppp_input(struct ifnet *ifp, struct mbuf *m)
goto drop;
/* Check queue. */
- if (! netisr_queue(isr, m)) {
+ if (netisr_queue(isr, m)) { /* (0) on success. */
if (debug)
log(LOG_DEBUG, SPP_FMT "protocol queue overflow\n",
SPP_ARGS(ifp));
OpenPOWER on IntegriCloud