]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ovpn: add support for asymmetric peer IDs
authorRalf Lici <ralf@mandelbit.com>
Wed, 9 Jul 2025 15:21:25 +0000 (17:21 +0200)
committerAntonio Quartulli <antonio@openvpn.net>
Tue, 17 Mar 2026 10:09:05 +0000 (11:09 +0100)
commit2e570a51408839b2079f3cb7e3944bf9b1184ee0
treed302c14ad034de2ddd6521a7877f66cdd41d8b8f
parent77de28cd7cf172e782319a144bf64e693794d78b
ovpn: add support for asymmetric peer IDs

In order to support the multipeer architecture, upon connection setup
each side of a tunnel advertises a unique ID that the other side must
include in packets sent to them. Therefore when transmitting a packet, a
peer inserts the recipient's advertised ID for that specific tunnel into
the peer ID field. When receiving a packet, a peer expects to find its
own unique receive ID for that specific tunnel in the peer ID field.

Add support for the TX peer ID and embed it into transmitting packets.
If no TX peer ID is specified, fallback to using the same peer ID both
for RX and TX in order to be compatible with the non-multipeer compliant
peers.

Cc: horms@kernel.org
Cc: donald.hunter@gmail.com
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Documentation/netlink/specs/ovpn.yaml
drivers/net/ovpn/crypto_aead.c
drivers/net/ovpn/netlink-gen.c
drivers/net/ovpn/netlink-gen.h
drivers/net/ovpn/netlink.c
drivers/net/ovpn/peer.c
drivers/net/ovpn/peer.h
include/uapi/linux/ovpn.h