summaryrefslogtreecommitdiff
path: root/src/src/ip.c
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-01-23 15:29:31 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2020-01-23 16:48:23 +0000
commit7d2f2d360f5a8ac6e0055074db813c3c3cfbeeb4 (patch)
tree1b6b968f17c03a8cce44ca7959e33fc521c77c47 /src/src/ip.c
parente4a04f2a8de013abe125d9d04219343b0a32662e (diff)
Dovecot auth: inet socket. Bug 2280
Diffstat (limited to 'src/src/ip.c')
-rw-r--r--src/src/ip.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/src/ip.c b/src/src/ip.c
index bf332b160..a6b7de389 100644
--- a/src/src/ip.c
+++ b/src/src/ip.c
@@ -482,7 +482,8 @@ bad:
/*XXX TFO? */
int
-ip_tcpsocket(const uschar * hostport, uschar ** errstr, int tmo)
+ip_tcpsocket(const uschar * hostport, uschar ** errstr, int tmo,
+ host_item * connhost)
{
int scan;
uschar hostname[256];
@@ -501,7 +502,7 @@ if (scan != 3)
}
return ip_connectedsocket(SOCK_STREAM, hostname, portlow, porthigh,
- tmo, NULL, errstr, NULL);
+ tmo, connhost, errstr, NULL);
}
int
@@ -534,12 +535,15 @@ return sock;
/* spec is either an absolute path (with a leading /), or
a host (name or IP) and port (whitespace-separated).
The port can be a range, dash-separated, or a single number.
+
+For a TCP socket, optionally fill in a host_item.
*/
int
-ip_streamsocket(const uschar * spec, uschar ** errstr, int tmo)
+ip_streamsocket(const uschar * spec, uschar ** errstr, int tmo,
+ host_item * connhost)
{
return *spec == '/'
- ? ip_unixsocket(spec, errstr) : ip_tcpsocket(spec, errstr, tmo);
+ ? ip_unixsocket(spec, errstr) : ip_tcpsocket(spec, errstr, tmo, connhost);
}
/*************************************************