You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/04/28 22:37:47 UTC
[trafficserver] branch 9.1.x updated: Fixes Issue #7739 - Next hop
strategy with bad 'to' URL causes TS crash. (#7749)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new f55e292 Fixes Issue #7739 - Next hop strategy with bad 'to' URL causes TS crash. (#7749)
f55e292 is described below
commit f55e292cca51b599c6d46d62074db3a497b1ca17
Author: John J. Rushford <jr...@apache.org>
AuthorDate: Wed Apr 28 07:06:33 2021 -0600
Fixes Issue #7739 - Next hop strategy with bad 'to' URL causes TS crash. (#7749)
(cherry picked from commit ea305b2190382045b2e6f7c5b5742a12cb15f08f)
---
proxy/http/remap/NextHopConsistentHash.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/proxy/http/remap/NextHopConsistentHash.cc b/proxy/http/remap/NextHopConsistentHash.cc
index d1d2b0f..0e7ba85 100644
--- a/proxy/http/remap/NextHopConsistentHash.cc
+++ b/proxy/http/remap/NextHopConsistentHash.cc
@@ -320,8 +320,10 @@ NextHopConsistentHash::findNextHop(TSHttpTxn txnp, void *ih, time_t now)
}
switch (ring_mode) {
case NH_ALTERNATE_RING:
- if (groups > 0) {
+ if (pRec && groups > 0) {
cur_ring = (pRec->group_index + 1) % groups;
+ } else {
+ cur_ring = 0;
}
break;
case NH_EXHAUST_RING: