From 18626031a3cbaeb470dba1d81adee2f6cd5cfd7d Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 10 May 2008 00:34:07 +0000 Subject: do_ifconfig works now for new tun/tap device --- src/deviceConfig.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/deviceConfig.hpp') diff --git a/src/deviceConfig.hpp b/src/deviceConfig.hpp index caa6913..8b534aa 100644 --- a/src/deviceConfig.hpp +++ b/src/deviceConfig.hpp @@ -39,9 +39,7 @@ enum device_type_t { TYPE_UNDEF, TYPE_TUN, TYPE_TAP }; class DeviceConfig { public: - DeviceConfig(const char* dev_name ,const char* dev_type, - const char* ifcfg_lp, const char* ifcfg_rnmp) : local_(ipv4, ifcfg_lp), - remote_netmask_(ipv4, ifcfg_rnmp) + DeviceConfig(const char* dev_name ,const char* dev_type, const char* ifcfg_lp, const char* ifcfg_rnmp) { type_ = TYPE_UNDEF; if(dev_type) { @@ -56,6 +54,11 @@ public: else if(!strncmp(dev_name, "tap", 3)) type_ = TYPE_TAP; } + + if(ifcfg_lp) + local_.setNetworkAddress(ipv4, ifcfg_lp); + if(ifcfg_rnmp) + remote_netmask_.setNetworkAddress(ipv4, ifcfg_rnmp); } private: -- cgit v1.2.3