mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-07 06:10:28 +00:00
Fix connect attempts to further IP addresses of outgoing server links
If a hostname resolves to more than one IP address (round-robin DNS, IPv4 and IPv6) and an attempt to connect to the first address fails, ngIRCd should try to connect to the 2nd address, 3rd address etc. But because of a wrong variable used in the call to New_Server(), the wrong server structure has been used in further connection attemps which possibly lead to connection attempts to already connected servers.
This commit is contained in:
parent
e2c9290030
commit
d7ad956a06
@ -207,7 +207,7 @@ cb_connserver(int sock, UNUSED short what)
|
|||||||
|
|
||||||
if (ng_ipaddr_af(&Conf_Server[server].dst_addr[0])) {
|
if (ng_ipaddr_af(&Conf_Server[server].dst_addr[0])) {
|
||||||
/* more addresses to try... */
|
/* more addresses to try... */
|
||||||
New_Server(res, &Conf_Server[server].dst_addr[0]);
|
New_Server(server, &Conf_Server[server].dst_addr[0]);
|
||||||
/* connection to dst_addr[0] is now in progress, so
|
/* connection to dst_addr[0] is now in progress, so
|
||||||
* remove this address... */
|
* remove this address... */
|
||||||
Conf_Server[server].dst_addr[0] =
|
Conf_Server[server].dst_addr[0] =
|
||||||
|
Loading…
Reference in New Issue
Block a user