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
164 164
		}
165 165

  
166 166
		if ((fds[0].revents & (POLLIN | POLLHUP))) {
167
			if (ifi && ifi->linkstat && ifi->rfdesc != -1)
167
			/* XXX profmakx: I am not sure whether updating the linkstate
168
			   here is the best idea, but it being not up to date leads
169
			   to a busy loop */
170
			ifi->linkstat = interface_status(ifi->name);
171
			if (ifi && ifi->linkstat && ifi->rfdesc != -1) {
168 172
				got_one();
173
			}
169 174
		}
170 175
		if ((fds[1].revents & (POLLIN | POLLHUP))) {
176
			note("fd1 ifi %p\n", ifi);
171 177
			if (ifi)
172 178
				routehandler();
173 179
		}
(1-1/2)