Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2843

scope6 fact should be per binding not per interface

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • Low
    • Resolution: Done
    • FACT 4.0.43
    • FACT 4.0.47
    • Facter 4
    • Night's Watch
    • 2
    • ghost-28.10, ghost-4.11, ghost-11.11, ghost 25.11, ghost-2.12, ghost-9.12
    • New Feature
    • Added scope6 fact under every ipv6 address from interface.bindings6 fact
    • Needs Assessment

    Description

       

      Interface can have multiple ipv6 addresses and each addresses can have a different scope.  currently facter reports a scope6 fact at the interface level however it should more correctly report it at the binding level.

      As an example given the following interface:

      2: en0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
       link/ether aa:aa:bb:bb:cc:cc brd ff:ff:ff:ff:ff:ff
      inet6 2001:db8::aaaa:bbff:febb:cccc/64 scope global mngtmpaddr dynamic
       valid_lft forever preferred_lft forever
      inet6 2001:db8::1/64 scope global
       valid_lft forever preferred_lft forever
      inet6 fe80::aaaa:bbff:febb:cccc/64 scope link
       valid_lft forever preferred_lft forever
      

       facter will report the following fact

      'en0' => {
        'bindings6' => [
              {
                address => "2001:db8::aaaa:bbff:febb:cccc",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "2620:0:861:103::"
              },
              {
                address => "2001:db8::1",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "2620:0:861:103::"
              },
              {
                address => "fe80::aaaa:bbff:febb:cccc",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "fe80::"
              }
        ]
        'scope6' => "global"
      

      However i think it would its more correct to have

      'en0' => {
        'bindings6' => [
              {
                address => "2001:db8::aaaa:bbff:febb:cccc",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "2620:0:861:103::"
                'scope' => "global"
              },
              {
                address => "2001:db8::1",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "2620:0:861:103::"
                'scope' => "global"
              },
              {
                address => "fe80::aaaa:bbff:febb:cccc",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "fe80::"
                'scope' => "link"
              }
        ]
      

      it would also be nice to capture the interface flags if they are present e.g.

      'en0' => {
        'bindings6' => [
              {
                address => "2001:db8::aaaa:bbff:febb:cccc",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "2620:0:861:103::"
                'scope' => "global"
                'flags' => ['mngtmpaddr', 'dynamic']
              },
              {
                address => "2001:db8::1",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "2620:0:861:103::"
                'scope' => "global"
              },
              {
                address => "fe80::aaaa:bbff:febb:cccc",
                netmask => "ffff:ffff:ffff:ffff::",
                network => "fe80::"
                'scope' => "link"
              }
        ]
      

      Attachments

        Activity

          People

            oana.tanasoiu Oana Tanasoiu
            b4ldr john
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support