Hi Jukka,

after a bit of debugging I think I start to understand what's happening. 
This mail only documents my current state of confusion.


The setting
-----------

I have a OpenVPN server which pushes some additional routes to its clients.
That means we not only get the default gateway to setup we also need to
add some additional routes.

For example if everything works correctly I get something like this:

$ ip r
default via 10.242.2.45 dev vpn0 
10.0.100.0/24 via 10.242.2.45 dev vpn0 
10.0.101.0/24 via 10.242.2.45 dev vpn0 
10.0.101.11 via 10.242.2.45 dev vpn0 
10.0.102.0/24 via 10.242.2.45 dev vpn0 
10.0.201.0/24 dev wlan0  proto kernel  scope link  src 10.0.201.129 
10.0.201.254 dev wlan0  scope link 
10.242.2.1 via 10.242.2.45 dev vpn0 
10.242.2.45 dev vpn0  scope link 
10.242.2.45 dev vpn0  proto kernel  scope link  src 10.242.2.46 
62.245.222.104 via 10.0.201.254 dev wlan0 
160.48.0.0/14 via 10.242.2.45 dev vpn0 
192.168.0.0/16 via 10.242.2.45 dev vpn0 
192.168.3.6 dev vpn0  scope link 
192.168.100.4 dev vpn0  scope link 

As you can see we have some special routes in the routing table
(10.0.101.0/24 via 242.2.45).


The symptons:
-------------

The above setup is working for ethernet and wifi but not for cellular uplink.
For cellular network I get following routing table:

$ ip r
default via 10.242.2.37 dev vpn0 
10.111.81.129 dev hso0  scope link 
10.129.32.1 dev hso0  scope link 
10.242.2.37 dev vpn0  scope link 
10.242.2.37 dev vpn0  proto kernel  scope link  src 10.242.2.38 
62.245.222.103 dev hso0  scope link 
88.128.232.50 dev hso0  scope link 
192.168.3.6 dev vpn0  scope link 
192.168.100.4 dev vpn0  scope link 

As you can see we have setup the default gatway over the tunnel but
the rest is missing.


Maybe the origin of the problem
-------------------------------

After getting several times really confused what is going on,
I start to understand some symptons I saw.

For example when using ethernet or wifi uplink there are no suspicious log
entries from OpenVPN. With cellular it changes a litte:


May  9 13:14:37 candlejack openvpn[19268]: PUSH: Received control message: 
'PUSH_REPLY,route remote_host 255.255.255.255 net_gateway,route 160.48.0.0 
255.252.0.0,route 10.0.101.11 255.255.255.255,route 10.0.100.0 
255.255.255.0,route 10.0.101.0 255.255.255.0,route 10.0.102.0 
255.255.255.0,route 192.168.0.0 255.255.0.0,dhcp-option DNS 
192.168.100.4,dhcp-option DNS 192.168.3.6,dhcp-option WINS 
192.168.100.4,dhcp-option WINS 192.168.100.1,dhcp-option DOMAIN 
bmw-carit.intra,route 10.242.2.1,topology net30,ping 10,ping-restart 
120,ifconfig 10.242.2.10 10.242.2.9'


Here you see that the OpenVPN server pushes some additional routes.


May  9 13:14:37 candlejack openvpn[19268]: ROUTE: default_gateway=UNDEF
May  9 13:14:37 candlejack openvpn[19268]: OpenVPN ROUTE: net_gateway undefined 
-- unable to get default gateway from system
May  9 13:14:37 candlejack openvpn[19268]: OpenVPN ROUTE: failed to 
parse/resolve route for host/network: remote_host


The OpenVPN client seems to have some troubles with
the default_gateway. After looking at openvpn/src/openvpn/route.c
I think if there is an error it will not stop somewhere in
the parsing of the pushed routes. I did not spend too much time in
reading that source code, so maybe I got it wrong. Thought it looks
really like to underlying problem.

Anyway, since I don't see the above error log for ethernet/wifi
I belive the OpenVPN client does not forward all routes
it gets from the server. 

Jukka, do you see something similar?

cheers,
daniel






_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to