Add TDB reference counting to ipsp_spd_lookup(). If an output
authorbluhm <bluhm@openbsd.org>
Fri, 3 Dec 2021 17:18:34 +0000 (17:18 +0000)
committerbluhm <bluhm@openbsd.org>
Fri, 3 Dec 2021 17:18:34 +0000 (17:18 +0000)
commit31a6915f939004ea5404ccba73aec710ab4ff5ff
treecb81d3c1e2f57e7af67dda081e7f07ca22b9e4fd
parentba6cd9e8581f5ac0f9c00690c35e19b31d40cfee
Add TDB reference counting to ipsp_spd_lookup().  If an output
pointer is passed to the function, it will return a refcounted TDB.
The ref happens when ipsp_spd_inp() copies the pointer from
ipo->ipo_tdb.  The caller of ipsp_spd_lookup() has to unref after
using it.
tested by Hrvoje Popovski; OK mvs@ tobhe@
sys/net/if_bridge.c
sys/netinet/ip_output.c
sys/netinet/ip_spd.c
sys/netinet6/ip6_forward.c
sys/netinet6/ip6_output.c