ovpn_dst_cache_current(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ovpn_dst_cache_current(9) β€” the vibe check for your route lookup

okay bestie, so this is ovpn_dst_cache_current(9) from the Kernel API Manual, and honestly? it's a little bodyguard function. it just checks whether a route lookup still matches what the peer is doing right now. no cap. 🫢


✨ SYNOPSIS ✨

bool ovpn_dst_cache_current (const struct ovpn_peer *peer , const struct
ovpn_bind *bind , const struct ovpn_route_key *key );

literally three args, one bool back. iconic signature, no notes. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • peer β€” the peer that owns the bind and the dst cache. it's giving main character energy, everything belongs to it.
  • bind β€” the RCU bind used for the route lookup.
  • key β€” the route key used for the route lookup.

🌸 DESCRIPTION 🌸

so here's the tea β˜• β€” this function checks that bind is still the current peer bind, and that key still matches the peer route key. both of them, bestie. no half-checking.

the caller must hold peer->lock. like, not optional, that's the rule. πŸ”’

and here's the cute part: the TX path keeps bind inside an RCU read-side critical section, so pointer identity alone is enough to detect whether the bind got replaced while the route lookup was running. obsessed with that for it, honestly. πŸ’…


πŸ‘‘ RETURN πŸ‘‘

true if the lookup result still matches the current peer state and may update the dst cache or replace the bind. that's the slay condition right there. ✨


πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./drivers/net/ovpn/udp.c and the whole friend group:


okay that's the whole page, you ate that πŸ“ β€” this little gem lives at ./drivers/net/ovpn, dated October 2026, and it's page ovpn_dst_cache_current(9) of the Kernel API Manual. mwah, go read it again, iykyk πŸ’– 🌈 ⭐

πŸ“¦ where this page comes from