0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00

Client will report its protocol as UDPv4 or TCPv4_CLIENT in options

compatibility string even if running over IPv6 transport to maintain
compatibility with 2.x branch.
This commit is contained in:
James Yonan 2013-02-19 19:15:52 +00:00
parent 32e9c62db7
commit 9f59e42be2
2 changed files with 4 additions and 4 deletions

View File

@ -518,7 +518,7 @@ namespace openvpn {
out << ",dev-type " << layer.dev_type();
out << ",link-mtu " << mtu() + link_mtu_adjust();
out << ",tun-mtu " << mtu();
out << ",proto " << protocol.str_client();
out << ",proto " << protocol.str_client(true);
{
const char *compstr = comp_ctx.options_string();

View File

@ -129,7 +129,7 @@ namespace openvpn {
}
}
const char *str_client() const
const char *str_client(const bool force_ipv4) const
{
switch (type_)
{
@ -138,9 +138,9 @@ namespace openvpn {
case TCPv4:
return "TCPv4_CLIENT";
case UDPv6:
return "UDPv6";
return force_ipv4 ? "UDPv4" : "UDPv6";
case TCPv6:
return "TCPv6_CLIENT";
return force_ipv4 ? "TCPv4_CLIENT" : "TCPv6_CLIENT";
default:
return "UNDEF_PROTO";
}