OpenVPN does not work?

Daniel Wagner wagi at monom.org
Mon Jan 17 04:38:57 PST 2011


On Mon, Jan 17, 2011 at 12:08:28PM +0100, Daniel Wagner wrote:
> [...]
> connmand[2519]: plugins/openvpn.c:ov_notify() local_port_1 = 0
> connmand[2519]: plugins/openvpn.c:ov_notify() remote_1 = image-build.sh.intel.com
> connmand[2519]: plugins/openvpn.c:ov_notify() remote_port_1 = 1194
> connmand[2519]: src/rtnl.c:connman_rtnl_add_newlink_watch() id 3
> connmand[2519]: src/service.c:__connman_service_indicate_state() service 0x82f8230 state 3
> connmand[2519]: src/stats.c:__connman_stats_service_register() service 0x82f8230
> connmand[2519]: src/ipconfig.c:__connman_ipconfig_enable() ipconfig 0x82f8a50
> connmand[2519]: src/ipconfig.c:connman_ipconfig_ref() ipconfig 0x82f8a50 refcount 2
> connmand[2519]: vpn0 up
> connmand[2519]: vpn0 lower up
> [...]
> 
> vpn.c:vpn_notify adds a RTNL new link watch (id 3). And later in your
> log we see it again
> 
> -------- backtrace --------
> [0]: vpn_newlink() [vpn.c:147]
> [1]: connman_rtnl_add_newlink_watch() [rtnl.c:249]
> [2]: vpn_notify() [vpn.c:171]
> [3]: task_filter() [task.c:402]
> [4]: message_dispatch() [mainloop.c:80]
> [5]: main() [main.c:252]
> [6]: _start() [iptables.c:0]
> ---------------------------
> 
> This looks like strange. And then provider->data has to NULL. Very strange.

There is already a device called vpn0 before the openvpn plugin starts. vpn0 might be a left over from the last session. 

connmand[2519]: vpn0 {create} index 14 type 65534 <NONE>
connmand[2519]: vpn0 {RX} 0 packets 0 bytes
connmand[2519]: vpn0 {TX} 2 packets 168 bytes
connmand[2519]: vpn0 {update} flags 69841 <UP,RUNNING,LOWER_UP>
connmand[2519]: src/ipconfig.c:__connman_ipconfig_lower_up() ipconfig ipv4 (nil) ipv6 (nil)
connmand[2519]: vpn0 {newlink} index 14 operstate 0 <UNKNOWN>

[...]

connmand[2519]: vpn0 {add} address 10.8.0.6/32 label vpn0 family 2

[...]

connmand[2519]: src/rtnl.c:rtnl_message() buf 0xbfee98f0 len 1168
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/ipconfig.c:__connman_ipconfig_newroute() index 14
connmand[2519]: vpn0 {add} route 10.8.0.5 gw 0.0.0.0 scope 253 <LINK>
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0002 seq 2
connmand[2519]: src/ipconfig.c:__connman_ipconfig_newroute() index 2
connmand[2519]: eth0 {add} route 10.239.50.104 gw 192.168.2.1 scope 0 <UNIVERSE>
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 52 type 24 flags 0x0002 seq 2
connmand[2519]: src/ipconfig.c:__connman_ipconfig_newroute() index 14
connmand[2519]: vpn0 {add} route 10.239.50.104 gw 0.0.0.0 scope 253 <LINK>
connmand[2519]: src/rtnl.c:rtnl_message() NEWROUTE len 52 type 24 flags 0x0002 seq 2
connmand[2519]: src/ipconfig.c:__connman_ipconfig_newroute() index 2

[...]

connmand[2519]: plugins/vpn.c:vpn_connect() openvpn started with dev vpn0
connmand[2519]: src/service.c:__connman_service_indicate_state() service 0x82f8230 state 2
connmand[2519]: src/profile.c:__connman_profile_changed() 
connmand[2519]: src/service.c:__connman_service_lookup_from_network() network 0x82fbba0
connmand[2519]: src/connection.c:find_active_gateway() 
connmand[2519]: plugins/dnsproxy.c:udp_listener_event() Received 42 bytes (id 0xa030)
connmand[2519]: plugins/dnsproxy.c:parse_request() id 0xa030 qr 0 opcode 0 qdcount 1 arcount 0
connmand[2519]: plugins/dnsproxy.c:parse_request() query image-build.sh.intel.com.
connmand[2519]: src/ondemand.c:connman_ondemand_connected() connected 1
connmand[2519]: plugins/dnsproxy.c:resolv() server 10.239.4.95 enabled 1
connmand[2519]: plugins/dnsproxy.c:forward_dns_reply() Received 58 bytes (id 0x0006)
connmand[2519]: plugins/dnsproxy.c:forward_dns_reply() id 0x0006 rcode 0
connmand[2519]: src/service.c:get_properties() service 0x82f8230
connmand[2519]: src/ipconfig.c:__connman_ipconfig_append_ipv4config() 
connmand[2519]: src/ipconfig.c:__connman_ipconfig_append_ipv6config() 
connmand[2519]: src/service.c:append_proxy() 
connmand[2519]: src/service.c:append_provider() 0x82f8230 0x82fe2c8
connmand[2519]: src/provider.c:connman_provider_get_string() provider 0x82fe2c8 key VPN.Domain
connmand[2519]: src/element.c:get_static_property() element 0x82fe2c8 name image_build_sh_intel_com_mydomain
connmand[2519]: plugins/openvpn.c:ov_notify() script_type = up
connmand[2519]: plugins/openvpn.c:ov_notify() dev = vpn0
connmand[2519]: plugins/openvpn.c:ov_notify() link_mtu = 1541
connmand[2519]: plugins/openvpn.c:ov_notify() tun_mtu = 1500
connmand[2519]: plugins/openvpn.c:ov_notify() script_context = init
connmand[2519]: plugins/openvpn.c:ov_notify() route_gateway_1 = 10.8.0.5
connmand[2519]: plugins/openvpn.c:ov_notify() route_netmask_1 = 255.255.255.255
connmand[2519]: plugins/openvpn.c:ov_notify() route_network_1 = 10.8.0.1
connmand[2519]: plugins/openvpn.c:ov_notify() route_vpn_gateway = 10.8.0.5
connmand[2519]: plugins/openvpn.c:ov_notify() route_net_gateway = 192.168.2.1
connmand[2519]: plugins/openvpn.c:ov_notify() ifconfig_remote = 10.8.0.5

[...]

So we reuse vpn0, right? If so, does this mean we have to make sure we
clear any internal data first? 

Jeff, can you reproduce this bug when you after a fresh reboot? Or
does this happen only after a restart of connman (after a crash)?

cheers,
daniel



                                                                                      
               



More information about the connman mailing list