i'm trying to connect to a softethervpn server from a 3G mobile router that has a OpenVpn service.
I would like to use a L2 (tap) connection and all goes fine until the ifconfig of the connection.
The server replyes with an "PUSH_REPLY" as the one of a bridge (L3) connection, not the one for a L2.
The client (on the 3G mobile router) expects a subnet mask like '255.255.255.0' or similar but it receive two next ips 'x.x.x.x' 'x.x.x.x+1' and exit with error 1.
(tomorrow i'll post the log of the connection, where it's clear what i say)
Opening the source code of softether i found this (between ##### my notes to the code)
Code: Select all
if (se->Mode == OPENVPN_MODE_L3) ####seems it replyes only for L3 mode, there is no else and another if for the L2 neither#####
{
// Add such as the IP address that was acquired from the DHCP server
// if the L3 mode to the option character string
DHCP_OPTION_LIST *cao = &se->IpcAsync->L3ClientAddressOption;
char ip_client[64];
char ip_tunnel_endpoint[64];
UINT ip_tunnel_endpoint_32;
char ip_network[64];
char ip_subnet_mask[64];
char ip_dns1[64];
char ip_dns2[64];
char ip_wins1[64];
char ip_wins2[64];
char ip_defgw[64];
ClearStr(ip_dns1, sizeof(ip_dns1));
ClearStr(ip_dns2, sizeof(ip_dns2));
ClearStr(ip_wins1, sizeof(ip_wins1));
ClearStr(ip_wins2, sizeof(ip_wins2));
ClearStr(ip_defgw, sizeof(ip_defgw));
IPToStr32(ip_client, sizeof(ip_client),
cao->ClientAddress);
// Generate a virtual gateway address to be passed to the OpenVPN
ip_tunnel_endpoint_32 = Endian32(cao->ClientAddress);
ip_tunnel_endpoint_32++; ####here where it's generated the couple of adjacent ips x.x.x.x and x.x.x.x+1####
ip_tunnel_endpoint_32 = Endian32(ip_tunnel_endpoint_32);
IPToStr32(ip_tunnel_endpoint, sizeof(ip_tunnel_endpoint), ip_tunnel_endpoint_32);
i'm wrong? i miss some step?
Thanks in andance for any preciuos help!