Page MenuHomeFreeBSD

if_ovpn: Support multihomed server configurations
ClosedPublic

Authored by markj on Thu, Jul 24, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 7, 7:49 AM
Unknown Object (File)
Wed, Aug 6, 8:17 AM
Unknown Object (File)
Mon, Aug 4, 3:39 AM
Unknown Object (File)
Tue, Jul 29, 3:01 AM
Unknown Object (File)
Tue, Jul 29, 12:01 AM
Unknown Object (File)
Mon, Jul 28, 11:55 PM
Unknown Object (File)
Mon, Jul 28, 9:49 PM
Unknown Object (File)
Mon, Jul 28, 5:40 PM

Details

Summary

In UDP server mode, openvpn implements the "multihome" option, which
makes it avoid binding to an address. Instead, the server socket is
bound to INADDR_ANY.

Today, when configuring a new peer and setting the source address,
sockaddr() returns the wildcard address, so the source address is
implicitly determined by the output interface. This doesn't work as one
would want if the WAN interface has multiple addresses and clients
connect to non-primary addresses.

Make multihome mode work properly: use the local address supplied by
openvpn in preference to that of the socket. We still fetch the port
number out of the socket.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable