1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-26 09:57:26 +03:00

network: do not recall link_handle_bound_by_list() or so when the interface is reconfigured

This commit is contained in:
Yu Watanabe 2021-11-14 11:51:58 +09:00
parent 52c3bc708f
commit b7ac128430

View File

@ -1584,6 +1584,16 @@ static int link_carrier_gained(Link *link) {
assert(link);
if (IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED)) {
/* At this stage, both wlan and link information should be up-to-date. Hence,
* it is not necessary to call RTM_GETLINK, NL80211_CMD_GET_INTERFACE, or
* NL80211_CMD_GET_STATION commands, and simply call link_reconfigure_impl().
* Note, link_reconfigure_impl() returns 1 when the link is reconfigured. */
r = link_reconfigure_impl(link, /* force = */ false);
if (r != 0)
return r;
}
r = link_handle_bound_by_list(link);
if (r < 0)
return r;
@ -1957,15 +1967,6 @@ static int link_update_flags(Link *link, sd_netlink_message *message) {
if (!had_carrier && link_has_carrier(link)) {
log_link_info(link, "Gained carrier");
if (IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED)) {
/* At this stage, both wlan and link information should be up-to-date. Hence,
* it is not necessary to call RTM_GETLINK, NL80211_CMD_GET_INTERFACE, or
* NL80211_CMD_GET_STATION commands, and simply call link_reconfigure_impl(). */
r = link_reconfigure_impl(link, /* force = */ false);
if (r < 0)
return r;
}
r = link_carrier_gained(link);
if (r < 0)
return r;