Make sure we show correct icon when a VPN connection with type of generic gets default route
Review Request #126714 - Created Jan. 11, 2016 and submitted
Reproducible with l2tp connections (you can use http://freel2tpvpn.com/). In case you activate it, NM creates automaticaly ppp0 connection which gets the default route, but this connection is type of generic, thus getting device for it in setIcons() leads to setDisconnectedIcon() because we care only about certain devices. What we actually have to do is to go through all active connections and find the one with hightest probability of being the main one (e.g. a wired connection is probably used as the main one than some wireless connection), also if there is an active VPN connection then it's probably the one for which NM created a ppp0 connection and it's the one we are interested about.
Tested with L2TP.