diff options
author | Andre Oppermann <andre@FreeBSD.org> | 2004-08-27 18:33:08 +0000 |
---|---|---|
committer | Andre Oppermann <andre@FreeBSD.org> | 2004-08-27 18:33:08 +0000 |
commit | 3161f583cab80c7b985abc00c709427f05f0acba (patch) | |
tree | 5e40bb2ff1fccfd1425f4b8ada947f22f8df6605 /sys/netinet6 | |
parent | 3713458b993a312e8739a204a2a7eaa1d711b9f8 (diff) | |
download | src-3161f583cab80c7b985abc00c709427f05f0acba.tar.gz src-3161f583cab80c7b985abc00c709427f05f0acba.zip |
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
Notes
Notes:
svn path=/head/; revision=134391
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ah_input.c | 4 | ||||
-rw-r--r-- | sys/netinet6/esp_input.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c index e03eb256a533..24e59ea2f5a7 100644 --- a/sys/netinet6/ah_input.c +++ b/sys/netinet6/ah_input.c @@ -449,7 +449,7 @@ ah4_input(m, off) goto fail; } - if (! netisr_queue(NETISR_IP, m)) { + if (netisr_queue(NETISR_IP, m)) { /* (0) on success. */ ipsecstat.in_inval++; m = NULL; goto fail; @@ -841,7 +841,7 @@ ah6_input(mp, offp, proto) goto fail; } - if (! netisr_queue(NETISR_IPV6, m)) { + if (netisr_queue(NETISR_IPV6, m)) { /* (0) on success. */ ipsec6stat.in_inval++; m = NULL; goto fail; diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c index e2440bfd1063..bb3c4afab135 100644 --- a/sys/netinet6/esp_input.c +++ b/sys/netinet6/esp_input.c @@ -389,7 +389,7 @@ noreplaycheck: goto bad; } - if (! netisr_queue(NETISR_IP, m)) { + if (netisr_queue(NETISR_IP, m)) { /* (0) on success. */ ipsecstat.in_inval++; m = NULL; goto bad; @@ -745,7 +745,7 @@ noreplaycheck: goto bad; } - if (! netisr_queue(NETISR_IPV6, m)) { + if (netisr_queue(NETISR_IPV6, m)) { /* (0) on success. */ ipsec6stat.in_inval++; m = NULL; goto bad; |