Bind to address

Allow binding to address before sending UDP packets.
This commit is contained in:
llorx
2019-11-04 22:46:41 +01:00
parent ecc90928d3
commit 79dccfd697
7 changed files with 22 additions and 7 deletions

View File

@@ -295,7 +295,7 @@ int tunnel_client_event_loop()
int & remote_fd=conn_info.remote_fd;
fd64_t &remote_fd64=conn_info.remote_fd64;
assert(new_connected_socket2(remote_fd,remote_addr)==0);
assert(new_connected_socket2(remote_fd,remote_addr,has_b,bind_addr)==0);
remote_fd64=fd_manager.create(remote_fd);
mylog(log_debug,"remote_fd64=%llu\n",remote_fd64);