Guard against carrier being spuriously set down.

Corrects a possible regression introduced by the previous patch.
This commit is contained in:
Nicholas J. Kain 2022-01-11 22:16:44 -05:00
parent f3766990f9
commit 6047f04a12

View File

@ -313,6 +313,7 @@ static void do_ndhc_work(void)
if (pfds[0].revents & POLLIN) {
had_event = true;
sev_nl = nl_event_get(&cs);
if (!cs.carrier_up)
cs.carrier_up = (sev_nl == IFS_UP);
}
if (pfds[0].revents & (POLLHUP|POLLERR|POLLRDHUP)) {