OpenVPN P2P client conf tls-client directive code
-
/etc/inc/openvpn.inc function openvpn_reconfigure()
down in the client part:// client specific settings if ($mode == 'client') { // configure p2p mode switch($settings['mode']) { case 'p2p_tls': $conf .= "tls-client\n"; case 'shared_key': $conf .= "client\n"; break; }
The OpenVPN doc http://openvpn.net/index.php/open-source/documentation/manuals/65-openvpn-20x-manpage.html says:
–client
A helper directive designed to simplify the configuration of OpenVPN's client mode. This directive is equivalent to:pull
tls-clientSo why is "case 'p2p_tls'" got no break statement and thus falling through to also put the "client" directive in the conf file?
That will be making it also effectively do "pull".
I think this is why the Remote Network/s box on a P2P client has no effect - it gets the remote network routes pulled from what is in Local Network/s at the server end. Probably that is good - it is somewhat easier for the person configuring the server end to input the settings of what networks are reachable at the server end.
The code just seems a little odd/accidental. This line could be removed without breaking anything:
$conf .= "tls-client\n";