Mark ethernet fd nonblocking to avoid waiting for an ethernet address

This commit is contained in:
Philip Homburg 2005-12-09 13:21:58 +00:00
parent 222fddd73a
commit e0634c0b47

View file

@ -173,6 +173,7 @@ int opendev(network_t *np, fdtype_t fdtype, int compete)
switch (fdtype) {
case FT_ETHERNET:
fcntl(np->fdp->fd, F_SETFL, fcntl(np->fdp->fd, F_GETFL) | O_NONBLOCK);
if (ioctl(np->fdp->fd, NWIOGETHSTAT, &ethstat) < 0) {
/* Not an Ethernet. */
close(fdp->fd);