summaryrefslogtreecommitdiff
path: root/src/linux/tunDevice.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-31 02:28:52 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-31 02:28:52 +0000
commit71a30642aa9b15d6730d8fcafa461fdeddba55ca (patch)
tree8283cf67e150437095e30839e76bf44557671392 /src/linux/tunDevice.cpp
parentadded disable-routing to configure script (diff)
started to port bsd tundevice to new ifconfig feature
removed possible null pointer derefernce
Diffstat (limited to 'src/linux/tunDevice.cpp')
-rw-r--r--src/linux/tunDevice.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linux/tunDevice.cpp b/src/linux/tunDevice.cpp
index 8fde8ae..8ab7ff8 100644
--- a/src/linux/tunDevice.cpp
+++ b/src/linux/tunDevice.cpp
@@ -127,6 +127,9 @@ int TunDevice::write(u_int8_t* buf, u_int32_t len)
if(fd_ < 0)
return -1;
+ if(!buf)
+ return 0;
+
if(with_pi_)
{
struct iovec iov[2];