When rfkill is disabled, resync the carrier state to be safe.

This change guards against possible regressions introduced by
f3766990f99ccaacb5d676cb59c9133e56d0ed6d if rfkill were to
prevent netlink carrier up events from being delivered while
rfkill is in effect for the interface.
This commit is contained in:
Nicholas J. Kain 2022-03-07 13:59:52 -05:00
parent f6dfd9a58a
commit 3773acf64d

1
ndhc.c
View File

@ -334,6 +334,7 @@ static void do_ndhc_work(void)
} else if (sev_rfk == RFK_DISABLED) { } else if (sev_rfk == RFK_DISABLED) {
rfkill_set = 0; rfkill_set = 0;
log_line("rfkill: radio now unblocked"); log_line("rfkill: radio now unblocked");
cs.carrier_up = ifchange_carrier_isup();
if (rfkill_nl_carrier_wentup && carrier_isup()) { if (rfkill_nl_carrier_wentup && carrier_isup()) {
// We might have changed networks while the radio was down. // We might have changed networks while the radio was down.
force_fingerprint = true; force_fingerprint = true;