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:31 UTC
[trafficserver] branch 9.0.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.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 2743095 Fixes Issue #7739 - Next hop strategy with bad 'to' URL causes TS crash. (#7749)
2743095 is described below
commit 27430954e12d0450fa1eb259d833e7141c80c42a
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 b28a6c1..a390f2a 100644
--- a/proxy/http/remap/NextHopConsistentHash.cc
+++ b/proxy/http/remap/NextHopConsistentHash.cc
@@ -316,8 +316,10 @@ NextHopConsistentHash::findNextHop(const uint64_t sm_id, ParentResult &result, R
}
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: