summaryrefslogtreecommitdiff
path: root/src/linux
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/linux
parentRelease 0.2.1 (diff)
fixed packet length errors
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/tun.c3
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];