summaryrefslogtreecommitdiff
path: root/src/bsd
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-04 00:27:29 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-04 00:27:29 +0000
commite7b22a000c65536c397242f9f0c6e5c2ac6a3281 (patch)
tree0e57e04cbce806df48b00cf6f76de5c921918e9b /src/bsd
parentfixed build on bsd (do_ifconfig not working yet) (diff)
added linux support for new ifconfig usage
Diffstat (limited to 'src/bsd')
-rw-r--r--src/bsd/tun.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bsd/tun.c b/src/bsd/tun.c
index 3eac360..07eae2b 100644
--- a/src/bsd/tun.c
+++ b/src/bsd/tun.c
@@ -226,6 +226,9 @@ void tun_close(tun_device_t* dev)
if(dev->net_addr_)
free(dev->net_addr_);
+
+ if(dev->net_mask_)
+ free(dev->net_mask_);
}
int tun_read(tun_device_t* dev, u_int8_t* buf, u_int32_t len)
@@ -280,7 +283,7 @@ int tun_write(tun_device_t* dev, u_int8_t* buf, u_int32_t len)
void tun_do_ifconfig(tun_device_t* dev)
{
- if(!dev || !dev->actual_name_ || !dev->net_addr_)
+ if(!dev || !dev->actual_name_ || !dev->net_addr_ || !dev->net_mask_)
return;