summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--anyctrOptions.cpp5
-rw-r--r--anytun.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/anyctrOptions.cpp b/anyctrOptions.cpp
index 17a8f3f..3513857 100644
--- a/anyctrOptions.cpp
+++ b/anyctrOptions.cpp
@@ -142,7 +142,7 @@ bool Options::parse(int argc, char* argv[])
return false;
PARSE_SCALAR_PARAM("-r","--remote-host", remote_addr_)
PARSE_SCALAR_PARAM("-o","--remote-port", remote_port_)
- PARSE_SCALAR_PARAM2("-n","--ifconfig", ifconfig_param_local_, ifconfig_param_remote_netmask_)
+ PARSE_SCALAR_PARAM("-n","--prefix", ifconfig_param_remote_netmask_)
PARSE_SCALAR_PARAM("-w","--window-size", seq_window_size_)
PARSE_SCALAR_PARAM("-m","--mux", mux_)
PARSE_SCALAR_PARAM("-l","--prefix-len", network_prefix_length_)
@@ -173,8 +173,7 @@ void Options::printUsage()
std::cout << "anyctr [-h|--help] prints this..." << std::endl;
std::cout << " [-r|--remote-host] <hostname|ip> remote host" << std::endl;
std::cout << " [-o|--remote-port] <port> remote port" << std::endl;
- std::cout << " [-n|--ifconfig] <local> the local address for the tun/tap device" << std::endl
- << " <remote|netmask> the remote address(tun) or netmask(tap)" << std::endl;
+ std::cout << " [-n|--prefix] <remote net> remote subnet for route" << std::endl;
std::cout << " [-w|--window-size] <window size> seqence number window size" << std::endl;
std::cout << " [-m|--mux] <mux-id> the multiplex id to use" << std::endl;
std::cout << " [-l|--prefix-len] <prefix length> network prefix length" << std::endl;
diff --git a/anytun.cpp b/anytun.cpp
index 616e1e2..75ca704 100644
--- a/anytun.cpp
+++ b/anytun.cpp
@@ -158,7 +158,9 @@ void* sender(void* p)
if(cit==param->cl.getEnd())
continue;
ConnectionParam & conn = cit->second;
-
+
+ if(conn.remote_host_==""||!conn.remote_port_)
+ continue;
// generate packet-key
conn.kd_.generate(LABEL_SATP_ENCRYPTION, conn.seq_nr_, session_key);
conn.kd_.generate(LABEL_SATP_SALT, conn.seq_nr_, session_salt);