Skip to content
  • Daniel P. Berrangé's avatar
    340849a9
    util: retry getaddrinfo if getting EAI_BADFLAGS with AI_V4MAPPED · 340849a9
    Daniel P. Berrangé authored
    
    
    The FreeBSD header files define the AI_V4MAPPED but its
    implementation of getaddrinfo() always returns an error
    when that flag is set. eg
    
      address resolution failed for localhost:9000: Invalid value for ai_flags
    
    There are also reports of the same problem on OS-X 10.6
    
    Since AI_V4MAPPED is not critical functionality, if we
    get an EAI_BADFLAGS error then just retry without the
    AI_V4MAPPED flag set. Use a static var to cache this
    status so we don't have to retry on every single call.
    
    Also remove its use from the test suite since it serves
    no useful purpose there.
    
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-Id: <1459786920-15961-1-git-send-email-berrange@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    340849a9
    util: retry getaddrinfo if getting EAI_BADFLAGS with AI_V4MAPPED
    Daniel P. Berrangé authored
    
    
    The FreeBSD header files define the AI_V4MAPPED but its
    implementation of getaddrinfo() always returns an error
    when that flag is set. eg
    
      address resolution failed for localhost:9000: Invalid value for ai_flags
    
    There are also reports of the same problem on OS-X 10.6
    
    Since AI_V4MAPPED is not critical functionality, if we
    get an EAI_BADFLAGS error then just retry without the
    AI_V4MAPPED flag set. Use a static var to cache this
    status so we don't have to retry on every single call.
    
    Also remove its use from the test suite since it serves
    no useful purpose there.
    
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-Id: <1459786920-15961-1-git-send-email-berrange@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading