summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
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/netinet6
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/netinet6')
-rw-r--r--sys/netinet6/ah_input.c4
-rw-r--r--sys/netinet6/esp_input.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c
index e03eb25..24e59ea 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 e2440bf..bb3c4af 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;
OpenPOWER on IntegriCloud