ovpn_peer_add(9)
π ovpn_peer_add β the Kernel API Manual one π¦
Okay so bestie, welcome to the ovpn_peer_add(9) page β¨ this is the kernel API manual's moment to shine, and honestly? It's giving "small function, big responsibility". Let's get into it π
β¨ NAME β¨
ovpn_peer_add β add a peer to the related tables πΈ
β¨ SYNOPSIS β¨
int ovpn_peer_add (struct ovpn_priv *ovpn , struct ovpn_peer *peer );
β¨ ARGUMENTS β¨
ovpnβ the openvpn instance that this peer belongs to πpeerβ the peer object you're adding, the main character of this whole operation π
β¨ DESCRIPTION β¨
Not much to say here and that's kind of iconic of it, ngl π«Ά β assume the refcounter was increased by the caller. That's the whole vibe check: you (the caller) already bumped it up before coming here. Don't come in with a cold refcount, that's not the move π
β¨ RETURN β¨
0 on success, or a negative error code otherwise π β so yeah, always check the return value fr fr β
No cap: negative means something went sideways. 0 means slay, it worked π
β¨ SEE ALSO β¨
Kernel file ./drivers/net/ovpn/peer.c, plus the whole friend group π₯:
ovpn_peer_keepalive_set(9)ovpn_peer_keepalive_send(9)ovpn_peer_new(9)ovpn_peer_reset_sockaddr(9)ovpn_peer_endpoints_update(9)ovpn_peer_release_rcu(9)ovpn_peer_release(9)ovpn_peer_release_kref(9)ovpn_peer_skb_to_sockaddr(9)ovpn_nexthop_from_skb4(9)ovpn_nexthop_from_skb6(9)ovpn_peer_get_by_vpn_addr4(9)ovpn_peer_get_by_vpn_addr6(9)ovpn_peer_vpn_addr_conflict4(9)ovpn_peer_vpn_addr_conflict6(9)ovpn_peer_transp_match(9)ovpn_peer_get_by_transp_addr_p2p(9)ovpn_peer_get_by_transp_addr(9)ovpn_peer_get_by_id_p2p(9)ovpn_peer_get_by_id(9)ovpn_peer_get_by_dst(9)ovpn_nexthop_from_rt4(9)ovpn_nexthop_from_rt6(9)ovpn_peer_check_by_src(9)ovpn_peer_add_mp(9)ovpn_peer_add_p2p(9)ovpn_peer_del_mp(9)ovpn_peer_del_p2p(9)ovpn_peer_del(9)ovpn_peer_release_p2p(9)ovpn_peers_free(9)ovpn_peer_keepalive_work(9)
And that's the page, bestie π sign-off time: this came out of ./drivers/net/ovpn, dated October 2026, and it's ovpn_peer_add(9) all the way down π mwah, go bump that refcounter π§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms