ovpn_peer_vp...dr_conflict4(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 ovpn_peer_vp...dr_conflict4(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” yes that's the manual name, yes it's fancy, we stay fancy here ✨ this one's a lil' helper from the OpenVPN kernel crew and it's genuinely so simple you're gonna slay it.


✨ NAME ✨

ovpn_peer_vpn_addr_conflict4 β€” the vibe check that tells you if a VPN v4 address is already taken πŸ‘€ like, is somebody else sitting in your seat, or are you good?


πŸ¦‹ SYNOPSIS πŸ¦‹

bool ovpn_peer_vpn_addr_conflict4 (struct ovpn_priv *ovpn , const struct
ovpn_peer *peer , const struct in_addr *addr );

πŸŽ€ ARGUMENTS πŸŽ€

  • ovpn β€” the openvpn instance you're searching through πŸ” like scrolling the group chat for a specific message.
  • peer β€” the peer that's being added or updated, or NULL if there's no peer in the picture πŸ™ˆ yes NULL is allowed, it's fine, we don't judge.
  • addr β€” the VPN IPv4 address you wanna check πŸ’– the one you're side-eyeing.

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea, bestie: this function checks whether addr is already assigned to another peer. That's it. That's the whole job. 🫢

And when a match is found, peer gets ignored β€” which is literally the point, because it means you can do peer updates that keep an existing address without the function throwing hands at you. Iconic behaviour, honestly. πŸ‘‘

Also: unspecified addresses are ignored. Not our problem, not today. πŸ’€


⚠️ NOTE ⚠️

the caller must hold ovpn->lock.

Not optional, not a suggestion, not a "maybe later" β€” the caller must hold ovpn->lock. Lock it or block it, babes. πŸ”’


⭐ RETURN ⭐

true on conflict, false otherwise. Boom. Binary. Periodt. πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./drivers/net/ovpn/peer.c plus this whole gorgeous extended universe of sibling functions, all of them (9) and all of them eating:


okay that's the page! 🧚 this lil' baddie lives in ./drivers/net/ovpn and it's stamped October 2026 β€” go forth, check those addresses, hold that lock, and remember: no cap, false means you're free to add πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from