service: Gateway IP address property is not sent
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Thu, 12 Jul 2012 12:32:42 +0000 (15:32 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 13 Jul 2012 09:41:59 +0000 (06:41 -0300)
The address of the IP gateway is not sent when the IP
property changes. This was because of timing issues i.e.,
the gateway was not yet set when the other IP properties
were sent.

Fixes BMC#25471

src/service.c

index fdd59d5..e944ff5 100644 (file)
@@ -5803,6 +5803,15 @@ static void service_ip_release(struct connman_ipconfig *ipconfig)
        settings_changed(service, ipconfig);
 }
 
+static void service_route_changed(struct connman_ipconfig *ipconfig)
+{
+       struct connman_service *service = __connman_ipconfig_get_data(ipconfig);
+
+       DBG("%s route changed", __connman_ipconfig_get_ifname(ipconfig));
+
+       settings_changed(service, ipconfig);
+}
+
 static const struct connman_ipconfig_ops service_ops = {
        .up             = service_up,
        .down           = service_down,
@@ -5810,6 +5819,8 @@ static const struct connman_ipconfig_ops service_ops = {
        .lower_down     = service_lower_down,
        .ip_bound       = service_ip_bound,
        .ip_release     = service_ip_release,
+       .route_set      = service_route_changed,
+       .route_unset    = service_route_changed,
 };
 
 static void setup_ip4config(struct connman_service *service, int index,