Skip to content

Commit

Permalink
[connman] Notify even when default does not change. Contributes to JB…
Browse files Browse the repository at this point in the history
…#42337

Call notifier even when default service does not change. This fixes an
important issue of DNS servers not being enabled and causing network not
to work (e.g., bad address from DNS). In order to keep the DNS servers
of the default service enabled notifier must be used to inform
dnsproxy.c and others using the notifier.
  • Loading branch information
LaakkonenJussi committed Aug 17, 2018
1 parent e0daaad commit 49f5f7d
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions connman/src/service.c
Expand Up @@ -2097,18 +2097,7 @@ static void default_changed(void)
if (service == current_default) {
DBG("default not changed %p %s",
service, service ? service->identifier : "NULL");

/*
* Run auto connect for VPNs when the service is connected. In
* case the service is still ready state the delayed connection
* of VPN must be started here.
*/
if (service && is_connected(service) &&
service->type != CONNMAN_SERVICE_TYPE_VPN) {
DBG("running vpn_auto_connect");
vpn_auto_connect();
}
return;
goto notify;
}

/*
Expand All @@ -2120,7 +2109,7 @@ static void default_changed(void)

if (service == current_default) {
DBG("new connected default route == current_default");
return;
goto notify;
}
}

Expand All @@ -2144,7 +2133,7 @@ static void default_changed(void)

if (service == current_default) {
DBG("Selected new default == current_default");
return;
goto notify;
}

DBG("Selected new default service %s",
Expand Down Expand Up @@ -2293,6 +2282,7 @@ static void default_changed(void)
CONNMAN_SERVICE_CONNECT_REASON_AUTO);
}

notify:
__connman_notifier_default_changed(service);
}

Expand Down

0 comments on commit 49f5f7d

Please sign in to comment.