summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-10-13 22:43:45 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-10-13 22:43:45 +0000
commitd7fb2512dd99167f87af5a8a158c9eea720faf3b (patch)
tree9eb50b5dee797eab8652394ba9c193775d212c8f /sys/netinet
parent6730de42809af4415518a35262faeece2fd9176b (diff)
The function crypto_dispatch() never returns an error. Make it
void and remove error handling in the callers. OK patrick@ mvs@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_ah.c10
-rw-r--r--sys/netinet/ip_esp.c10
-rw-r--r--sys/netinet/ip_ipcomp.c12
-rw-r--r--sys/netinet/ipsec_input.c8
-rw-r--r--sys/netinet/ipsec_output.c8
5 files changed, 20 insertions, 28 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c
index 24bc3df1345..050d0e634d9 100644
--- a/sys/netinet/ip_ah.c
+++ b/sys/netinet/ip_ah.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah.c,v 1.155 2021/10/13 14:36:31 bluhm Exp $ */
+/* $OpenBSD: ip_ah.c,v 1.156 2021/10/13 22:43:44 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -699,8 +699,8 @@ ah_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
memcpy(&tc->tc_dst, &tdb->tdb_dst, sizeof(union sockaddr_union));
tc->tc_rpl = tdb->tdb_rpl;
- error = crypto_dispatch(crp);
- return error;
+ crypto_dispatch(crp);
+ return 0;
drop:
m_freem(m);
@@ -1145,8 +1145,8 @@ ah_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
tc->tc_rdomain = tdb->tdb_rdomain;
memcpy(&tc->tc_dst, &tdb->tdb_dst, sizeof(union sockaddr_union));
- error = crypto_dispatch(crp);
- return error;
+ crypto_dispatch(crp);
+ return 0;
drop:
m_freem(m);
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c
index 352b71d0b5d..eec2887f222 100644
--- a/sys/netinet/ip_esp.c
+++ b/sys/netinet/ip_esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.c,v 1.173 2021/10/13 14:36:31 bluhm Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.174 2021/10/13 22:43:44 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -528,8 +528,8 @@ esp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
crde->crd_len = m->m_pkthdr.len - (skip + hlen + alen);
}
- error = crypto_dispatch(crp);
- return error;
+ crypto_dispatch(crp);
+ return 0;
drop:
m_freem(m);
@@ -1012,8 +1012,8 @@ esp_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
crda->crd_len = m->m_pkthdr.len - (skip + alen);
}
- error = crypto_dispatch(crp);
- return error;
+ crypto_dispatch(crp);
+ return 0;
drop:
m_freem(m);
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c
index 1e639ab7de4..124a095e6d5 100644
--- a/sys/netinet/ip_ipcomp.c
+++ b/sys/netinet/ip_ipcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.c,v 1.75 2021/10/13 14:36:31 bluhm Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.76 2021/10/13 22:43:44 bluhm Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -139,7 +139,7 @@ ipcomp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
{
const struct comp_algo *ipcompx = tdb->tdb_compalgxform;
struct tdb_crypto *tc;
- int hlen, error;
+ int hlen;
struct cryptodesc *crdc = NULL;
struct cryptop *crp;
@@ -188,8 +188,8 @@ ipcomp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
tc->tc_rdomain = tdb->tdb_rdomain;
tc->tc_dst = tdb->tdb_dst;
- error = crypto_dispatch(crp);
- return error;
+ crypto_dispatch(crp);
+ return 0;
}
int
@@ -482,8 +482,8 @@ ipcomp_output(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
crp->crp_opaque = (caddr_t)tc;
crp->crp_sid = tdb->tdb_cryptoid;
- error = crypto_dispatch(crp);
- return error;
+ crypto_dispatch(crp);
+ return 0;
drop:
m_freem(m);
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c
index 815a20893d9..67f94919bc1 100644
--- a/sys/netinet/ipsec_input.c
+++ b/sys/netinet/ipsec_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_input.c,v 1.182 2021/10/05 11:45:26 bluhm Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.183 2021/10/13 22:43:44 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -401,11 +401,7 @@ ipsec_input_cb(struct cryptop *crp)
/* Reset the session ID */
if (tdb->tdb_cryptoid != 0)
tdb->tdb_cryptoid = crp->crp_sid;
- error = crypto_dispatch(crp);
- if (error) {
- DPRINTF("crypto dispatch error %d", error);
- goto drop;
- }
+ crypto_dispatch(crp);
return;
}
DPRINTF("crypto error %d", crp->crp_etype);
diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c
index bb9b7488883..dcde98fc5d8 100644
--- a/sys/netinet/ipsec_output.c
+++ b/sys/netinet/ipsec_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_output.c,v 1.88 2021/10/13 14:36:31 bluhm Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.89 2021/10/13 22:43:44 bluhm Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -409,11 +409,7 @@ ipsec_output_cb(struct cryptop *crp)
/* Reset the session ID */
if (tdb->tdb_cryptoid != 0)
tdb->tdb_cryptoid = crp->crp_sid;
- error = crypto_dispatch(crp);
- if (error) {
- DPRINTF("crypto dispatch error %d", error);
- goto drop;
- }
+ crypto_dispatch(crp);
return;
}
DPRINTF("crypto error %d", crp->crp_etype);