Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1787

iprange fails to match ipv6 addresses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 3.6.0
    • Fix Version/s: None
    • Component/s: Built-in functions
    • Labels:
      None
    • Platform:
      Any
    • Steps to reproduce:
      Acceptance/unit test attached

      Description

       
      bundle agent main
      {
         vars:
            "ip_list" string => execresult( "/bin/ip addr list lo", "noshell" );
      
         classes:
            "PASS_ipv6_range"  expression => iprange( "::1-7" );
            "PASS_ipv6_single" expression => iprange( "::1" );
            "PASS_ipv4"        expression => iprange( "127.0.0.0-254" );
      
         reports:
            debug::
               "cfversion: ${sys.cf_version}";
               "${ip_list}";
      
            PASS_ipv6_range::
               "PASS_ipv6_range";
            PASS_ipv6_single::
               "PASS_ipv6_single";
            PASS_ipv4::
               "PASS_ipv4";
            !PASS_ipv6_range::
               "FAIL_ipv6_range";
            !PASS_ipv6_single::
               "FAIL_ipv6_single";
            !PASS_ipv4::
               "FAIL_ipv4";
      }
      
      neil@ettin ~/.cfagent/inputs $ cf-agent -Kf ./iprange.cf -D debug
      R: cfversion: 3.6.3
      R: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host 
             valid_lft forever preferred_lft forever
      R: PASS_ipv4
      R: FAIL_ipv6_range
      R: FAIL_ipv6_single
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vpodzime Vratislav Podzimek
                Reporter:
                neilhwatson Neil Watson
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel