summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-03-30 00:57:48 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-03-30 00:57:48 +0000
commit9c0d3aa37810ae37b82951986fb4170c39fc9c41 (patch)
treedb23769e27020bfd83ae61fc85e481b2171d1c13 /src
parentbb68e38a10ff9932617cbaae9625bfa3e6b8e616 (diff)
downloads6-networking-9c0d3aa37810ae37b82951986fb4170c39fc9c41.tar.xz
- Bugfix: s6-tcpclient and s6-tcpserver-access didn't s6dns_init()
- Version: rc for 2.1.0.1
Diffstat (limited to 'src')
-rw-r--r--src/conn-tools/s6-tcpclient.c2
-rw-r--r--src/conn-tools/s6-tcpserver-access.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/conn-tools/s6-tcpclient.c b/src/conn-tools/s6-tcpclient.c
index 4686636..f2cb9d7 100644
--- a/src/conn-tools/s6-tcpclient.c
+++ b/src/conn-tools/s6-tcpclient.c
@@ -113,7 +113,7 @@ int main (int argc, char const *const *argv)
tain_now_g() ;
if (flags.timeout) tain_addsec_g(&deadline, flags.timeout) ;
else tain_add_g(&deadline, &tain_infinite_relative) ;
-
+ if (!s6dns_init()) strerr_diefu1sys(111, "init DNS") ;
{
ip46_t ip[2][MAXIP] ;
unsigned int j = 0 ;
diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c
index db2e2a5..2e14845 100644
--- a/src/conn-tools/s6-tcpserver-access.c
+++ b/src/conn-tools/s6-tcpserver-access.c
@@ -239,10 +239,20 @@ int main (int argc, char const *const *argv, char const *const *envp)
byte_copy(tcpremotehost, protolen, proto) ;
byte_copy(tcpremotehost + protolen, 11, "REMOTEHOST") ;
+ if (!s6dns_init())
+ {
+ if (verbosity >= 2) strerr_warnwu1sys("init DNS") ;
+ if (flagfatal)
+ {
+ e = 111 ;
+ goto reject ;
+ }
+ }
if (localname)
{
if (!env_addmodif(&modifs, tcplocalhost, localname)) dienomem() ;
}
+ else
{
s6dns_domain_arpafromip46(&blob[0].q, &localip) ;
s6dns_domain_encode(&blob[0].q) ;