summaryrefslogtreecommitdiff
path: root/src/bsd
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-16 18:10:21 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-16 18:10:21 +0000
commit0e592faadecfb3bc2705bf0d9e434163e4b914ca (patch)
tree69562b708620918dd9f456873ccc46b10e169382 /src/bsd
parentRelease 0.2.1 (diff)
fixed packet length errors
Diffstat (limited to 'src/bsd')
-rw-r--r--src/bsd/tun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bsd/tun.c b/src/bsd/tun.c
index b609a3c..43da1d0 100644
--- a/src/bsd/tun.c
+++ b/src/bsd/tun.c
@@ -256,6 +256,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];