Mark ethernet fd nonblocking to avoid waiting for an ethernet address
This commit is contained in:
parent
222fddd73a
commit
e0634c0b47
1 changed files with 1 additions and 0 deletions
|
@ -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, ðstat) < 0) {
|
||||
/* Not an Ethernet. */
|
||||
close(fdp->fd);
|
||||
|
|
Loading…
Reference in a new issue