diff options
Diffstat (limited to 'src/core/devices')
| -rw-r--r-- | src/core/devices/nm-device.c | 15 | ||||
| -rw-r--r-- | src/core/devices/wifi/nm-device-wifi.c | 23 | ||||
| -rw-r--r-- | src/core/devices/wwan/nm-modem-ofono.c | 17 |
3 files changed, 38 insertions, 17 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 3565c04d..d080b540 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -10339,14 +10339,14 @@ _dev_ipdhcpx_notify(NMDhcpClient *client, const NMDhcpClientNotifyData *notify_d if (notify_data->lease_update.accepted) { nm_manager_write_device_state(priv->manager, self, NULL); + nm_dispatcher_call_device(NM_DISPATCHER_ACTION_DHCP_CHANGE_X(IS_IPv4), + self, + NULL, + NULL, + NULL, + NULL); if (priv->ipdhcp_data_x[IS_IPv4].state != NM_DEVICE_IP_STATE_READY) { _dev_ipdhcpx_set_state(self, addr_family, NM_DEVICE_IP_STATE_READY); - nm_dispatcher_call_device(NM_DISPATCHER_ACTION_DHCP_CHANGE_X(IS_IPv4), - self, - NULL, - NULL, - NULL, - NULL); _dev_ip_state_check_async(self, addr_family); } } @@ -14542,6 +14542,9 @@ _set_unmanaged_flags(NMDevice *self, if (transition_state) { new_state = was_managed ? NM_DEVICE_STATE_UNMANAGED : NM_DEVICE_STATE_UNAVAILABLE; + if (new_state == NM_DEVICE_STATE_UNMANAGED) { + _cancel_activation(self); + } if (now) nm_device_state_changed(self, new_state, reason); else diff --git a/src/core/devices/wifi/nm-device-wifi.c b/src/core/devices/wifi/nm-device-wifi.c index 171743d0..03625f8d 100644 --- a/src/core/devices/wifi/nm-device-wifi.c +++ b/src/core/devices/wifi/nm-device-wifi.c @@ -2912,10 +2912,11 @@ supplicant_connection_timeout_cb(gpointer user_data) } static NMSupplicantConfig * -build_supplicant_config(NMDeviceWifi *self, - NMConnection *connection, - guint32 fixed_freq, - GError **error) +build_supplicant_config(NMDeviceWifi *self, + NMSettingsConnection *sett_conn, + NMConnection *connection, + guint32 fixed_freq, + GError **error) { NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE(self); NMSupplicantConfig *config = NULL; @@ -2944,7 +2945,10 @@ build_supplicant_config(NMDeviceWifi *self, goto error; } - if (!nm_supplicant_config_add_bgscan(config, connection, error)) { + if (!nm_supplicant_config_add_bgscan(config, + connection, + nm_settings_connection_get_num_seen_bssids(sett_conn), + error)) { g_prefix_error(error, "bgscan: "); goto error; } @@ -3227,7 +3231,8 @@ ensure_hotspot_frequency(NMDeviceWifi *self, NMSettingWireless *s_wifi, NMWifiAP freq = nm_platform_wifi_find_frequency(nm_device_get_platform(device), nm_device_get_ifindex(device), - rnd_freqs); + rnd_freqs, + TRUE); if (freq == 0) freq = rnd_freqs[0]; @@ -3278,6 +3283,7 @@ act_stage2_config(NMDevice *device, NMDeviceStateReason *out_failure_reason) NMActRequest *req; NMWifiAP *ap; NMConnection *connection; + NMSettingsConnection *sett_conn; const char *setting_name; NMSettingWireless *s_wireless; GError *error = NULL; @@ -3301,6 +3307,9 @@ act_stage2_config(NMDevice *device, NMDeviceStateReason *out_failure_reason) ap_mode = nm_wifi_ap_get_mode(ap); + sett_conn = nm_act_request_get_settings_connection(req); + nm_assert(sett_conn); + connection = nm_act_request_get_applied_connection(req); s_wireless = nm_connection_get_setting_wireless(connection); nm_assert(s_wireless); @@ -3349,7 +3358,7 @@ act_stage2_config(NMDevice *device, NMDeviceStateReason *out_failure_reason) set_powersave(device); /* Build up the supplicant configuration */ - config = build_supplicant_config(self, connection, nm_wifi_ap_get_freq(ap), &error); + config = build_supplicant_config(self, sett_conn, connection, nm_wifi_ap_get_freq(ap), &error); if (!config) { _LOGE(LOGD_DEVICE | LOGD_WIFI, "Activation: (wifi) couldn't build wireless configuration: %s", diff --git a/src/core/devices/wwan/nm-modem-ofono.c b/src/core/devices/wwan/nm-modem-ofono.c index 33a19e93..de105bbd 100644 --- a/src/core/devices/wwan/nm-modem-ofono.c +++ b/src/core/devices/wwan/nm-modem-ofono.c @@ -1320,9 +1320,18 @@ handle_settings(NMModemOfono *self, GVariant *v_dict) } } - if (g_variant_lookup(v_dict, "MessageProxy", "&s", &s)) { - _LOGI("MessageProxy: %s", s); - if (s && nm_inet_parse_bin(AF_INET, s, NULL, &address_network)) { + if (g_variant_lookup(v_dict, "Proxy", "&s", &s) && s) { + gs_free char *proxy = g_strdup(s); + char *colon; + + _LOGI("(MMS) Proxy: %s", s); + + /* Strip the port out. We can do this as we know this is IPv4. */ + colon = strchr(proxy, ':'); + if (colon) + *colon = '\0'; + + if (nm_inet_parse_bin(AF_INET, proxy, NULL, &address_network)) { const NMPlatformIP4Route mms_route = { .network = address_network, .plen = 32, @@ -1335,7 +1344,7 @@ handle_settings(NMModemOfono *self, GVariant *v_dict) nm_l3_config_data_add_route_4(priv->l3cd_4, &mms_route); } else - _LOGW("invalid MessageProxy: %s", s); + _LOGW("invalid (MMS) Proxy: %s", s); } ret = TRUE; |