summaryrefslogtreecommitdiff
path: root/src/deviceConfig.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/deviceConfig.hpp')
-rw-r--r--src/deviceConfig.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/deviceConfig.hpp b/src/deviceConfig.hpp
index a3dbe74..acca46e 100644
--- a/src/deviceConfig.hpp
+++ b/src/deviceConfig.hpp
@@ -65,6 +65,9 @@ public:
type_ = TYPE_TUN;
else if(dev_type == "tap")
type_ = TYPE_TAP;
+
+ if(type_ == TYPE_TUN && (ifcfg_lp == "" || ifcfg_rnmp == ""))
+ throw std::runtime_error("Device type tun requires ifconfig parameters (--ifconfig)");
#endif
if(ifcfg_lp != "")