Mark ethernet fd nonblocking to avoid waiting for an ethernet address
This commit is contained in:
parent
222fddd73a
commit
e0634c0b47
|
@ -173,6 +173,7 @@ int opendev(network_t *np, fdtype_t fdtype, int compete)
|
||||||
|
|
||||||
switch (fdtype) {
|
switch (fdtype) {
|
||||||
case FT_ETHERNET:
|
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) {
|
if (ioctl(np->fdp->fd, NWIOGETHSTAT, ðstat) < 0) {
|
||||||
/* Not an Ethernet. */
|
/* Not an Ethernet. */
|
||||||
close(fdp->fd);
|
close(fdp->fd);
|
||||||
|
|
Loading…
Reference in a new issue