summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipcomp.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-10-24 14:24:30 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-10-24 14:24:30 +0000
commit762427d35da6bb88aa7fa12c067f9c9581ae041a (patch)
tree09ff22dbea5020756b61efa6cfee8ee46f68fb2d /sys/netinet/ip_ipcomp.c
parent19ce5d1571ee51bcd38edfc9957f59d9e2d174be (diff)
Pass the error of the IPsec callback to the caller. The dropped
counter is handled there. OK tobhe@
Diffstat (limited to 'sys/netinet/ip_ipcomp.c')
-rw-r--r--sys/netinet/ip_ipcomp.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c
index 7efa768b85e..59ac573b187 100644
--- a/sys/netinet/ip_ipcomp.c
+++ b/sys/netinet/ip_ipcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.c,v 1.82 2021/10/23 22:19:37 bluhm Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.83 2021/10/24 14:24:29 bluhm Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -203,13 +203,7 @@ ipcomp_input(struct mbuf **mp, struct tdb *tdb, int skip, int protoff)
/* Release the crypto descriptors */
crypto_freereq(crp);
- error = ipcomp_input_cb(tdb, tc, m, clen);
- if (error) {
- ipsecstat_inc(ipsec_idrops);
- tdb->tdb_idrops++;
- }
-
- return 0;
+ return ipcomp_input_cb(tdb, tc, m, clen);
drop:
m_freemp(mp);
@@ -530,13 +524,7 @@ ipcomp_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
/* Release the crypto descriptors */
crypto_freereq(crp);
- error = ipcomp_output_cb(tdb, tc, m, ilen, olen);
- if (error) {
- ipsecstat_inc(ipsec_odrops);
- tdb->tdb_odrops++;
- }
-
- return 0;
+ return ipcomp_output_cb(tdb, tc, m, ilen, olen);
drop:
m_freem(m);