Displaying 1 result from an estimated 1 matches for "net_connect_ip_blocking".
2019 Jan 04
1
Feature request: client bind address for replication
...info("Using doveadm_local_ip setting: %s",my_ip);
+ use_my_ip = 1;
+ }
alarm(DOVEADM_TCP_CONNECT_TIMEOUT_SECS);
ret = net_gethostbyname(host, &ips, &ips_count);
if (ret != 0) {
i_fatal("Lookup of host %s failed: %s",
host, net_gethosterror(ret));
}
- fd = net_connect_ip_blocking(&ips[0], port, NULL);
+ fd = net_connect_ip_blocking(&ips[0], port, use_my_ip ? &my_net_ip : NULL);
if (fd == -1) {
i_fatal("connect(%s:%u) failed: %m",
net_ip2addr(&ips[0]), port);
@@ -121,7 +131,7 @@
return fd;
}
-int doveadm_tcp_connect(const char *target,...