From 3db8f505b9c611100ebf0133ef90800b09f8abaa Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Tue, 4 Sep 2007 17:50:31 +0000 Subject: tunnel type fixed --- anytun.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'anytun.cpp') diff --git a/anytun.cpp b/anytun.cpp index d754adb..e7d5134 100644 --- a/anytun.cpp +++ b/anytun.cpp @@ -182,8 +182,8 @@ int main(int argc, char* argv[]) SignalController sig; sig.init(); - - TunDevice dev(opt.getDevName().c_str(),opt.getDevType().c_str(), opt.getIfconfigParamLocal().c_str(), opt.getIfconfigParamRemoteNetmask().c_str()); + std::string dev_type(opt.getDevType()); + TunDevice dev(opt.getDevName().c_str(), dev_type=="" ? NULL : dev_type.c_str(), opt.getIfconfigParamLocal().c_str(), opt.getIfconfigParamRemoteNetmask().c_str()); SeqWindow seq(opt.getSeqWindowSize()); uint8_t key[] = { -- cgit v1.2.3