summaryrefslogtreecommitdiff
path: root/src/deviceConfig.hpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-05-10 00:34:07 +0000
committerChristian Pointner <equinox@anytun.org>2008-05-10 00:34:07 +0000
commit18626031a3cbaeb470dba1d81adee2f6cd5cfd7d (patch)
tree2cea0f5af3cd692cc634cf2d5f147d99608d4525 /src/deviceConfig.hpp
parentsmall cleanup (diff)
do_ifconfig works now for new tun/tap device
Diffstat (limited to 'src/deviceConfig.hpp')
-rw-r--r--src/deviceConfig.hpp9
1 files changed, 6 insertions, 3 deletions
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: