Project

General

Profile

Bug #2732 » 0001-dhclient-Update-linkstate-after-poll.patch

profmakx, 11/19/2014 04:37 PM

View differences:

sbin/dhclient/dispatch.c
}
if ((fds[0].revents & (POLLIN | POLLHUP))) {
if (ifi && ifi->linkstat && ifi->rfdesc != -1)
/* XXX profmakx: I am not sure whether updating the linkstate
here is the best idea, but it being not up to date leads
to a busy loop */
ifi->linkstat = interface_status(ifi->name);
if (ifi && ifi->linkstat && ifi->rfdesc != -1) {
got_one();
}
}
if ((fds[1].revents & (POLLIN | POLLHUP))) {
note("fd1 ifi %p\n", ifi);
if (ifi)
routehandler();
}
(1-1/2)