Re: Unable to get the gateway of a service that is not the default route.
I forgot to mention one thing, i have PreferredTechnologies = ethernet in my main.conf. On Mon, Feb 25, 2013 at 5:32 PM, Sameer Naik sameer.subscripti...@damagehead.com wrote: Hello, I am using connman-1.11 on an STB platform that has an inbuilt LAN port. For WIFI i am using a wifi dongle. So far i have got every thing working fine. I am able to connect to wired and wireless networks. I am currently testing the stuff out and understanding some connman behaviour patterns along the way. I found that when i connect both the wired and wifi technologies (i.e. connect to a service for each), only one of them goes in the online state. Both will be never enter the online state under normal circumstances. eg. 1. Start connman with lan cable connected Connman connects to the lan network and enter the online state 2. Connect to a wireless service Connman connects to the wireless service, and the service remains in the offline state until the ethernet cable is disconnected. This is probably a behaviour by design and i can understand why it is this way. One of the reason being that only one interface can serve as the default route at a time, etc. But what i noticed is that, if i get the ipv4 configuration for each of the technologies, only the service that is on currently serving as the default route return the gateway. To make my point clearer, please refer to the output of GetServices method at http://pastebin.com/DVkXJiNB. You will notice that of the 2 connected services, only the wired service returns the gateway address. Is this by design? Is possible to get the gateway for services that are in READY state?? Thanks and Regards ~Sameer ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Unable to get the gateway of a service that is not the default route.
Hi, On Mon, 2013-02-25 at 17:32 +0530, Sameer Naik wrote: I found that when i connect both the wired and wifi technologies (i.e. connect to a service for each), only one of them goes in the online state. Both will be never enter the online state under normal circumstances. eg. 1. Start connman with lan cable connected Connman connects to the lan network and enter the online state 2. Connect to a wireless service Connman connects to the wireless service, and the service remains in the offline state until the ethernet cable is disconnected. This is probably a behaviour by design and i can understand why it is this way. One of the reason being that only one interface can serve as the default route at a time, etc. Your observation is correct, only one default route is set at a time. As a default route is defined as matching every packet and sending the packets to the gateway, only one gateway is set at any time. So only the service which has the default route will contain gateway information. Thus the network information provided by all services is identical to what can be read from the routing table. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Unable to get the gateway of a service that is not the default route.
Hello Patrik, But shouldn't the gateway returned for each service be the route setup for the interface on which the service is running (at least display purposes) ie. 192.168.1.1 * 255.255.255.255 UH0 00 eth0 192.168.6.1 * 255.255.255.255 UH0 00 wlan0 By looking up the service that is currently in the online state, i would be able to tell which is the default route (provided that only one service is in the online at any given time, which right now is not always the case). Of course, i should be able to get the gateway information using socket api's or something for my display purposes. But i believe connman would do a better job at it ;) Regards ~Sameer On Mon, Feb 25, 2013 at 6:03 PM, Patrik Flykt patrik.fl...@linux.intel.comwrote: Hi, On Mon, 2013-02-25 at 17:32 +0530, Sameer Naik wrote: I found that when i connect both the wired and wifi technologies (i.e. connect to a service for each), only one of them goes in the online state. Both will be never enter the online state under normal circumstances. eg. 1. Start connman with lan cable connected Connman connects to the lan network and enter the online state 2. Connect to a wireless service Connman connects to the wireless service, and the service remains in the offline state until the ethernet cable is disconnected. This is probably a behaviour by design and i can understand why it is this way. One of the reason being that only one interface can serve as the default route at a time, etc. Your observation is correct, only one default route is set at a time. As a default route is defined as matching every packet and sending the packets to the gateway, only one gateway is set at any time. So only the service which has the default route will contain gateway information. Thus the network information provided by all services is identical to what can be read from the routing table. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: Unable to get the gateway of a service that is not the default route.
On Mon, Feb 25, 2013 at 7:17 PM, Patrik Flykt patrik.fl...@linux.intel.comwrote: On Mon, 2013-02-25 at 18:24 +0530, Sameer Naik wrote: 192.168.1.1 * 255.255.255.255 UH0 00 eth0 192.168.6.1 * 255.255.255.255 UH0 00 wlan0 These are individual host routes to the DNS servers. In normal circumstances the DNS server is co-located to the DHCP server box, at least with normal home networking. By looking up the service that is currently in the online state, i would be able to tell which is the default route (provided that only one service is in the online at any given time, The first service in the service list is the one with the default route and also the only one which can be online. Otherwise... which right now is not always the case). ...you have found a bug, I believe. I may be wrong about this... i will need to recheck. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman