]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Support NCP in pure P2P VPN setups
authorArne Schwabe <arne@rfc2549.org>
Wed, 28 Jul 2021 12:30:50 +0000 (14:30 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 2 Aug 2021 09:33:31 +0000 (11:33 +0200)
commit8c72d7981c32c43d1c7967a312bb439e13fc5b40
tree4bc85999ee6e912602a237a5605fefbdd10742dd
parentf235b5efd6106ad4f899d6da899c617afc6ff9e9
Support NCP in pure P2P VPN setups

Currently P2P mode of OpenVPN is on of the few places that cannot negotiate
modern OpenVPN features. This becomes more and more problematic since P2P
and P2MP code diverge more and more and also the lack of switching to more
advanced features like Data v2 currently blocks P2P mode from working
together with the upcoming ovpn-dco support.

This NCP support is a lot simpler and works in the following way:

- P2P peer announce an extremely limited IV_ variable set
  (IV_PROTO and IV_CIPHERS)
- Both peers check if the IV_PROTO_NCP_P2P bit is present in IV_PROTO
- if yes both sides deterministically determine according to
  IV_PROTO and IV_CIPHER what options can be used and start using these

There are no poor man's NCP or other compatibility workaround like in the
normal NCP, making this NCP leaner and more deterministic.

Patch v2: remove empty lines, add doxygen comment to push_peer_info, fix
          push_peer_info >= 2 that should be > 2

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20210728123050.564595-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22671.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c
src/openvpn/options.c
src/openvpn/ssl.c
src/openvpn/ssl.h
src/openvpn/ssl_backend.h
src/openvpn/ssl_common.h
src/openvpn/ssl_ncp.c
src/openvpn/ssl_ncp.h
tests/unit_tests/openvpn/test_ncp.c