Below is the patch for connman bug filed on bugs.meego.com
http://bugs.meego.com/show_bug.cgi?id=7895

Description:
monitor-connman does not display the IPv4 gateway information in the 
PropertyChanged signal.

Analysis:
The PropertyChanged signal for IPv4/IPv6 property is emitted whenever the 
interface IP address is set/changed. The PropertyChanged signal for IPv4/IPv6 
property provides the ip configuration details like address, netmask, gateway 
etc.

When a new WiFi is discovered and configured, a IP address is assigned to the 
WiFi interface. After the address/netmask are set, the PropertyChanged signal 
is emitted.  But at this point the route is still not set and as a result the 
gateway field of IPv4/IPv6 property is empty and hence no gateway information 
is displayed by monitor-connman.

Solution:
Emitting PropertyChanged signal even for route addition will display the 
gateway information. Also emitting PropertyChanged signal for route deletions.

Patch:
----------

diff --git a/src/ipconfig.c b/src/ipconfig.c
index 0a7eb8b..2b60e2d 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -707,6 +707,7 @@ void __connman_ipconfig_newroute(int index, int family, 
unsigned char scope,
 
        if (scope == 0 && g_strcmp0(dst, "0.0.0.0") == 0) {
                GSList *list;
+               GList *config_list;
 
                if (family == AF_INET6) {
                        g_free(ipdevice->ipv6_gateway);
@@ -728,6 +729,20 @@ void __connman_ipconfig_newroute(int index, int family, 
unsigned char scope,
                        g_free(ipaddress->gateway);
                        ipaddress->gateway = g_strdup(gateway);
                }
+
+               for (config_list = g_list_first(ipconfig_list); config_list;
+                                       config_list = g_list_next(config_list)) 
{
+                       struct connman_ipconfig *ipconfig = config_list->data;
+
+                       if (index != ipconfig->index)
+                               continue;
+
+                       if (ipconfig->ops == NULL)
+                               continue;
+
+                       if (ipconfig->ops->ip_bound)
+                               ipconfig->ops->ip_bound(ipconfig);
+               }
        }
 
        connman_info("%s {add} route %s gw %s scope %u <%s>",
@@ -748,6 +763,7 @@ void __connman_ipconfig_delroute(int index, int family, 
unsigned char scope,
 
        if (scope == 0 && g_strcmp0(dst, "0.0.0.0") == 0) {
                GSList *list;
+               GList *config_list;
 
                if (family == AF_INET6) {
                        g_free(ipdevice->ipv6_gateway);
@@ -769,6 +785,20 @@ void __connman_ipconfig_delroute(int index, int family, 
unsigned char scope,
                        g_free(ipaddress->gateway);
                        ipaddress->gateway = NULL;
                }
+
+               for (config_list = g_list_first(ipconfig_list); config_list;
+                                       config_list = g_list_next(config_list)) 
{
+                       struct connman_ipconfig *ipconfig = config_list->data;
+
+                       if (index != ipconfig->index)
+                               continue;
+
+                       if (ipconfig->ops == NULL)
+                               continue;
+
+                       if (ipconfig->ops->ip_release)
+                               ipconfig->ops->ip_release(ipconfig);
+               }
        }
 
        connman_info("%s {del} route %s gw %s scope %u <%s>",
----------

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to