You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/11/13 07:39:05 UTC

[GitHub] [trafficserver] masaori335 commented on a change in pull request #7320: Fix lookup split dns rule with fast path

masaori335 commented on a change in pull request #7320:
URL: https://github.com/apache/trafficserver/pull/7320#discussion_r522736942



##########
File path: iocore/dns/SplitDNS.cc
##########
@@ -222,38 +222,36 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result)
   /* ---------------------------
      the 'alleged' fast path ...
      --------------------------- */
-  if (m_bEnableFastPath) {
+  if (m_bEnableFastPath && m_pxLeafArray) {
     SplitDNSRecord *data_ptr = nullptr;
     char *pHost              = const_cast<char *>(rdata->get_host());
     if (nullptr == pHost) {
       Warning("SplitDNS: No host to match !");
       return;
     }
 
-    int len        = strlen(pHost);
-    HostLeaf *pxHL = static_cast<HostLeaf *>(m_pxLeafArray);

Review comment:
       I'm not familiar with `iocore/HostLookup.h`, but I'm pretty sure this cast is wrong.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org