diff options
Diffstat (limited to 'sys/netinet6')
| -rw-r--r-- | sys/netinet6/ah_input.c | 15 | ||||
| -rw-r--r-- | sys/netinet6/esp_input.c | 15 | ||||
| -rw-r--r-- | sys/netinet6/ip6_input.c | 1 |
3 files changed, 9 insertions, 22 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c index 1aaa0c40c800a..b0489d1d5e352 100644 --- a/sys/netinet6/ah_input.c +++ b/sys/netinet6/ah_input.c @@ -470,16 +470,13 @@ ah4_input(m, va_alist) key_sa_recordxfer(sav, m); - s = splimp(); - if (IF_QFULL(&ipintrq)) { + if (! IF_HANDOFF(&ipintrq, m, NULL)) { ipsecstat.in_inval++; - splx(s); + m = NULL; goto fail; } - IF_ENQUEUE(&ipintrq, m); m = NULL; schednetisr(NETISR_IP); /*can be skipped but to make sure*/ - splx(s); nxt = IPPROTO_DONE; } else { /* @@ -596,7 +593,6 @@ ah6_input(mp, offp, proto) u_char *cksum; struct secasvar *sav = NULL; u_int16_t nxt; - int s; #ifndef PULLDOWN_TEST IP6_EXTHDR_CHECK(m, off, sizeof(struct ah), IPPROTO_DONE); @@ -875,16 +871,13 @@ ah6_input(mp, offp, proto) key_sa_recordxfer(sav, m); - s = splimp(); - if (IF_QFULL(&ip6intrq)) { + if (! IF_HANDOFF(&ip6intrq, m, NULL)) { ipsec6stat.in_inval++; - splx(s); + m = NULL; goto fail; } - IF_ENQUEUE(&ip6intrq, m); m = NULL; schednetisr(NETISR_IPV6); /*can be skipped but to make sure*/ - splx(s); nxt = IPPROTO_DONE; } else { /* diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c index 09162766a04c8..4d4344b974f69 100644 --- a/sys/netinet6/esp_input.c +++ b/sys/netinet6/esp_input.c @@ -122,7 +122,6 @@ esp4_input(m, va_alist) int ivlen; size_t hlen; size_t esplen; - int s; va_list ap; int off, proto; @@ -389,16 +388,13 @@ noreplaycheck: key_sa_recordxfer(sav, m); - s = splimp(); - if (IF_QFULL(&ipintrq)) { + if (! IF_HANDOFF(&ipintrq, m, NULL)) { ipsecstat.in_inval++; - splx(s); + m = NULL; goto bad; } - IF_ENQUEUE(&ipintrq, m); m = NULL; schednetisr(NETISR_IP); /*can be skipped but to make sure*/ - splx(s); nxt = IPPROTO_DONE; } else { /* @@ -733,16 +729,13 @@ noreplaycheck: key_sa_recordxfer(sav, m); - s = splimp(); - if (IF_QFULL(&ip6intrq)) { + if (! IF_HANDOFF(&ip6intrq, m, NULL)) { ipsec6stat.in_inval++; - splx(s); + m = NULL; goto bad; } - IF_ENQUEUE(&ip6intrq, m); m = NULL; schednetisr(NETISR_IPV6); /*can be skipped but to make sure*/ - splx(s); nxt = IPPROTO_DONE; } else { /* diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 6ded43098824b..6238179fd134a 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -167,6 +167,7 @@ ip6_init() pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW) ip6_protox[pr->pr_protocol] = pr - inet6sw; ip6intrq.ifq_maxlen = ip6qmaxlen; + mtx_init(&ip6intrq.ifq_mtx, "ip6_inq", MTX_DEF); register_netisr(NETISR_IPV6, ip6intr); nd6_init(); frag6_init(); |
