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/net/if_bridge.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/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index bfc4cd2f1b3..c7ebf80173a 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.359 2021/11/25 13:46:02 bluhm Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.360 2021/12/01 12:51:09 bluhm Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -1594,9 +1594,9 @@ bridge_ipsec(struct ifnet *ifp, struct ether_header *eh, int hassnap, return (0); } } else { /* Outgoing from the bridge. */ - tdb = ipsp_spd_lookup(m, af, hlen, &error, - IPSP_DIRECTION_OUT, NULL, NULL, 0); - if (tdb != NULL) { + error = ipsp_spd_lookup(m, af, hlen, IPSP_DIRECTION_OUT, + NULL, NULL, &tdb, 0); + if (error == 0 && tdb != NULL) { /* * We don't need to do loop detection, the * bridge will do that for us. |