Repository: trafficserver Updated Branches: refs/heads/master b89553001 -> cb35e6ca1
TS-3932: apply Connection options before we start a connect Make sure to call Connection::apply_options() within Connection::connect() so that the IP TOS field will be set properly. The first call to apply_options() within Connect::open() does not set the IP TOS field properly since the addr is not initialized at that time. This closes #318. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cb35e6ca Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cb35e6ca Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cb35e6ca Branch: refs/heads/master Commit: cb35e6ca143dd8618e0b73877853a32b3f6e4474 Parents: b895530 Author: pbchou <[email protected]> Authored: Mon Nov 2 17:34:38 2015 -0800 Committer: James Peach <[email protected]> Committed: Mon Nov 16 14:27:35 2015 -0800 ---------------------------------------------------------------------- iocore/net/UnixConnection.cc | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb35e6ca/iocore/net/UnixConnection.cc ---------------------------------------------------------------------- diff --git a/iocore/net/UnixConnection.cc b/iocore/net/UnixConnection.cc index bcf560e..e0aaef3 100644 --- a/iocore/net/UnixConnection.cc +++ b/iocore/net/UnixConnection.cc @@ -323,6 +323,9 @@ Connection::connect(sockaddr const *target, NetVCOptions const &opt) this->setRemote(target); + // apply dynamic options with this.addr initialized + apply_options(opt); + cleaner<Connection> cleanup(this, &Connection::_cleanup); // mark for close until we succeed. res = ::connect(fd, target, ats_ip_size(target));
