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

cf-agent does not use IPv6 properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Need more Info
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Network
    • Labels:
      None

      Description

      The problem here appears to be in libcfnet where it looks like an inconsistency is introduced. libcfnet/communication.c explicitly uses AF_INET for AgentConnection() - whereas libcfnet/client_code.c uses AF_UNSPEC calling AgentConnection(), but it doesn't take. The end result is that cf-agent only ever attempts IPv4, which is inconsistent from cf-serverd behavior (defaults to v6 exclusive) and ignores host OS preferences.

      With the current behavior pairing, this means that cf-agent in a mixed-v4/v6 environment is unable to use DNS properly. The only available workaround is for the agent to be pointed at the IPv6 address of the policy hub(s) and basically forego all DNS.

      The attached patch has been tested only on FreeBSD, but should work for all OSes and makes agent/server behavior closer to consistent. On OSes with proper IPv6 implementations, cf-agent will now attempt AAAA lookup when v6 is preferred, and will attempt A lookup when v4 is preferred. (Will also submit a pull request.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10038 jimis (Dimitrios Apostolou)
                Reporter:
                rootwyrm Phillip Jaenke
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel