From 70fab85292205475adc9cb9880d877d1104b88c3 Mon Sep 17 00:00:00 2001 From: Markus Pfeiffer Date: Thu, 20 Nov 2014 00:30:59 +0000 Subject: [PATCH] dhclient: Update linkstate after poll The ifi->linkstat variable seemed to be not updated after the poll returns in dispatch.c. This might only be a hack, but it makes the busylooping go away. --- sbin/dhclient/dispatch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index fdad0c7..aaceb7c 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -164,6 +164,10 @@ another: } if ((fds[0].revents & (POLLIN | POLLHUP))) { + /* 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(); } -- 2.1.2