Bind to interface

Allow binding to interface instead of IP with SO_BINDTODEVICE.
This commit is contained in:
llorx
2019-11-04 23:26:11 +01:00
parent 79dccfd697
commit 939b347129
7 changed files with 29 additions and 5 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,has_b,bind_addr)==0);
assert(new_connected_socket2(remote_fd,remote_addr,has_b,bind_addr,interface_string)==0);
remote_fd64=fd_manager.create(remote_fd);
mylog(log_debug,"remote_fd64=%llu\n",remote_fd64);