Add the ListenAddress option.
ListenAddress works the same as BindToAddress, except that from now on, explicitly binding outgoing packets to the address of a socket is only done for sockets specified with BindToAddress.
This commit is contained in:
parent
e187758a7e
commit
38adc8bf54
7 changed files with 144 additions and 92 deletions
|
|
@ -116,7 +116,7 @@ static bool bind_to_interface(int sd) {
|
|||
static bool bind_to_address(connection_t *c) {
|
||||
int s = -1;
|
||||
|
||||
for(int i = 0; i < listen_sockets; i++) {
|
||||
for(int i = 0; i < listen_sockets && listen_socket[i].bindto; i++) {
|
||||
if(listen_socket[i].sa.sa.sa_family != c->address.sa.sa_family)
|
||||
continue;
|
||||
if(s >= 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue