Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-9032

IP Check policy doesn't support IPv6

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.13.0 GA
    • Gateway
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      IP Check policy uses lua-resty-iputils library, which doesn't support IPv6.

      This library indicate to useĀ lua-libcidr-ffi as an alternative, but it has system library dependency (libcidr) and has a low level methods. Further information could be found at lua-resty-iputils IPv6 implementation thread.

      The library is used on this two methods:

      local iputils = require("resty.iputils")
      
      ...
      
      local function parse_cidrs(cidrs)
        return iputils.parse_cidrs(cidrs or {})
      end
      
      local function ip_in_range(ip, cidrs)
        return iputils.ip_in_cidrs(ip, cidrs)
      end

      Source: ip_check.lua

      Error message at APIcast gateway:

      [lua] iputils.lua:36: log_err(): Error parsing '2001:8d8:974:7c00::7a:da8c': Invalid IP, context: ngx.timer.

              Unassigned Unassigned
              rhn-support-eazevedo Ernani Azevedo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: