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



##########
File path: apisix/stream/router/ip_port.lua
##########
@@ -71,6 +76,18 @@ do
             end
 
             local route = item.value
+            if item.value.remote_addr then
+                local remote_matcher = 
core_ip.create_ip_matcher({item.value.remote_addr})
+                if remote_matcher then

Review comment:
       We don't need to check the returned value, it should be checked in the 
check function.

##########
File path: apisix/stream/router/ip_port.lua
##########
@@ -176,13 +193,31 @@ function _M.routes()
     return user_routes.values, user_routes.conf_version
 end
 
+local function address_checker(item)

Review comment:
       This function doesn't only check address.
   ```suggestion
   local function checker(item)
   ```

##########
File path: apisix/stream/router/ip_port.lua
##########
@@ -176,13 +193,31 @@ function _M.routes()
     return user_routes.values, user_routes.conf_version
 end
 
+local function address_checker(item)
+    if item.plugins then
+        return plugin_checker(item)

Review comment:
       Need to check both plugins and address




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to