diff options
Diffstat (limited to 'src/linux')
-rw-r--r-- | src/linux/tun.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linux/tun.c b/src/linux/tun.c index bcf1885..88d6d6e 100644 --- a/src/linux/tun.c +++ b/src/linux/tun.c @@ -157,6 +157,9 @@ int tun_write(tun_device_t* dev, u_int8_t* buf, u_int32_t len) if(!dev || dev->fd_ < 0) return -1; + if(!buf) + return 0; + if(dev->with_pi_) { struct iovec iov[2]; |