HomeFreeBSD

if_ovpn: improve reconnect handling

Description

if_ovpn: improve reconnect handling

When a DCO client reconnects (e.g. on server restart) OpenVPN may create a new
socket rather than reusing the existing one. This used to be rejected because we
expect all peers to use the same socket. However, if there are no peers it's
safe to release the previous socket and install the tunnel function on the new
one.

See also: https://redmine.pfsense.org/issues/15928
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 3624de5394991c0cacd42d5a3b33e35c1a002e09)

Details

Provenance
kpAuthored on Wed, Dec 18, 4:10 PM
Parents
rG0fd06bd44aa0: pf: fix double free in pf_state_key_attach()
Branches
Unknown
Tags
Unknown