From e8ecc904b80bf9d420417f273b0cefe2f84b4c4f Mon Sep 17 00:00:00 2001 From: david Date: Fri, 13 Aug 2010 21:47:09 +0000 Subject: [PATCH] Call nsi_set_hostname in service_scan.cc. --- service_scan.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service_scan.cc b/service_scan.cc index 425b176b0..701ad06e0 100644 --- a/service_scan.cc +++ b/service_scan.cc @@ -1810,6 +1810,10 @@ static void startNextProbe(nsock_pool nsp, nsock_iod nsi, ServiceGroup *SG, } if (o.ipoptionslen) nsi_set_ipoptions(svc->niod, o.ipoptions, o.ipoptionslen); + if (svc->target->TargetName()) { + if (nsi_set_hostname(svc->niod, svc->target->TargetName()) == -1) + fatal("nsi_set_hostname(\"%s\" failed in %s()", svc->target->TargetName(), __func__); + } svc->target->TargetSockAddr(&ss, &ss_len); if (svc->tunnel == SERVICE_TUNNEL_NONE) { nsock_connect_tcp(nsp, svc->niod, servicescan_connect_handler,