GNOME Bugzilla – Bug 704610
let GNetworkMonitor be more flexible with routes
Last modified: 2013-07-20 15:56:32 UTC
In my case, I'm under VPN and the default route has no explicitly address, but a network interface: jwendell:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 vpn0 10.x.x.0 0.0.0.0 255.255.252.0 U 0 0 0 vpn0 x.y.z.k 192.168.0.1 255.255.255.255 UGH 0 0 0 wlp3s0 192.168.0.0 0.0.0.0 255.255.255.0 U 9 0 0 wlp3s0 192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 Here, x.y.z.k is the main address of the vpn (the other peer), and it must go through my physical network interface wlp3s0, with the gateway 192.168.0.1. Currently GNetworkMonitor only cares about destinations, and g_network_monitor_get_network_available() always returns FALSE. In this patch I'm turning it more flexible: it checks if there's a gateway set; if yes, then we assume we have connectivity, by using the address 0.0.0.0/0 and making g_network_monitor_base_add_network() happy.
*** This bug has been marked as a duplicate of bug 701609 ***