This is an automated email from the ASF dual-hosted git repository.
jacksontj pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 2bd250b TS-4533 correctly set default DNS port when using
ats_ip_pton
2bd250b is described below
commit 2bd250b3bbe7d249682f9a7e88741dc0a93e5293
Author: Thomas Jackson <[email protected]>
AuthorDate: Tue Jun 14 14:23:16 2016 -0700
TS-4533 correctly set default DNS port when using ats_ip_pton
in the switch over from the custom parser to using ats_ip_pton the default
port was dropped.
---
lib/ts/ink_res_init.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/ts/ink_res_init.cc b/lib/ts/ink_res_init.cc
index b9de715..0b12f10 100644
--- a/lib/ts/ink_res_init.cc
+++ b/lib/ts/ink_res_init.cc
@@ -497,6 +497,10 @@ ink_res_init(ink_res_state statp, ///< State
object to update.
if ((*cp != '\0') && (*cp != '\n')) {
ts::ConstBuffer host(cp, strcspn(cp, ";# \t\n"));
if (0 == ats_ip_pton(host, &statp->nsaddr_list[nserv].sa)) {
+ // If there was no port in the config, lets use NAMESERVER_PORT
+ if (ats_ip_port_host_order(&statp->nsaddr_list[nserv].sa) == 0) {
+ ats_ip_port_cast(&statp->nsaddr_list[nserv].sa) =
htons(NAMESERVER_PORT);
+ }
++nserv;
}
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].