You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jr...@apache.org on 2021/04/28 13:06:50 UTC
[trafficserver] branch master 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.
jrushford pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new ea305b2 Fixes Issue #7739 - Next hop strategy with bad 'to' URL causes TS crash. (#7749)
ea305b2 is described below
commit ea305b2190382045b2e6f7c5b5742a12cb15f08f
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)
---
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 be47d6d..c079a8d 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: