You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/05 13:36:06 UTC

[GitHub] [apisix] Zheaoli commented on a change in pull request #4980: fix(stream_route): replace ip match tools by using ipmatcher

Zheaoli commented on a change in pull request #4980:
URL: https://github.com/apache/apisix/pull/4980#discussion_r702426387



##########
File path: apisix/stream/router/ip_port.lua
##########
@@ -33,14 +35,38 @@ local _M = {version = 0.1}
 
 local function match_addrs(route, vars)
     -- todo: use resty-ipmatcher to support multiple ip address
-    if route.value.remote_addr and
-       route.value.remote_addr ~= vars.remote_addr then
-        return false
+    if route.value.remote_addr then
+        local ip = remote_addr_match_cache[route.value.remote_addr]

Review comment:
         Make sense, I'll update mycode




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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