diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-31 02:28:52 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-31 02:28:52 +0000 |
commit | 71a30642aa9b15d6730d8fcafa461fdeddba55ca (patch) | |
tree | 8283cf67e150437095e30839e76bf44557671392 /src/linux | |
parent | added 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')
-rw-r--r-- | src/linux/tunDevice.cpp | 3 |
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]; |