diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-12-01 12:51:10 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-12-01 12:51:10 +0000 |
commit | 5c5ac9bf6824a286285b5c684059d4c656192580 (patch) | |
tree | c8935829ff8ca773828d17e86fcbcf720420c7a1 /sys/netinet6/ip6_forward.c | |
parent | e229d53f37a7c090cecfcb6c1e82fa1f2355dc91 (diff) |
Let ipsp_spd_lookup() return an error instead of a TDB. The TDB
is not always needed, but the error value is necessary for the
caller. As TDB should be refcounted, it makes not sense to always
return it. Pass an output pointer for the TDB which can be NULL.
OK mvs@ tobhe@
Diffstat (limited to 'sys/netinet6/ip6_forward.c')
-rw-r--r-- | sys/netinet6/ip6_forward.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index ba9c25e16d1..c838aeeed9f 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_forward.c,v 1.102 2021/11/22 13:47:10 bluhm Exp $ */ +/* $OpenBSD: ip6_forward.c,v 1.103 2021/12/01 12:51:09 bluhm Exp $ */ /* $KAME: ip6_forward.c,v 1.75 2001/06/29 12:42:13 jinmei Exp $ */ /* @@ -145,8 +145,8 @@ reroute: #ifdef IPSEC if (ipsec_in_use) { - tdb = ip6_output_ipsec_lookup(m, &error, NULL); - if (error != 0) { + error = ip6_output_ipsec_lookup(m, NULL, &tdb); + if (error) { /* * -EINVAL is used to indicate that the packet should * be silently dropped, typically because we've asked |