X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdevices%2Ftap%2Ftap.c;h=288099e26857b6e1b849a591195883de6d9d385f;hb=0d3d4824a46205e776ff32c82be4cb514f459a5f;hp=5f6d720c645e6e2e26dc8a2d515fe2bfd1db4dbe;hpb=599db9e9d0c61ac39b16cc572f975cdc70c07783;p=vpp.git diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c index 5f6d720c645..288099e2685 100644 --- a/src/vnet/devices/tap/tap.c +++ b/src/vnet/devices/tap/tap.c @@ -223,7 +223,12 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args) else host_if_name = (char *) args->host_if_name; - fcntl (tfd, F_SETFL, O_NONBLOCK); + if (fcntl (tfd, F_SETFL, O_NONBLOCK) < 0) + { + err = clib_error_return_unix (0, "fcntl(tfd, F_SETFL, O_NONBLOCK)"); + tap_log_err (vif, "set nonblocking: %U", format_clib_error, err); + goto error; + } tap_log_dbg (vif, "TUNSETVNETHDRSZ: fd %d vnet_hdr_sz %u", tfd, hdrsz); _IOCTL (tfd, TUNSETVNETHDRSZ, &hdrsz);