Skip to content

getaddrinfo fails to parse IPv6 address on some systems #34

@alistairking

Description

@alistairking

As reported by @vgiotsas

It seems that the way we use getaddrinfo (https://github.com/CAIDA/bgpstream/blob/master/lib/utils/bgpstream_utils_addr.c#L209) will fail to parse an IPv6 address on (some?) IPv6-only systems. Probably omitting AI_ADDRCONFIG from hints would fix this, but it seems there can be issues with getaddrinfo (see https://blog.powerdns.com/2014/05/21/a-surprising-discovery-on-converting-ipv6-addresses-we-no-longer-prefer-getaddrinfo/), so we may want to consider switching to inet_pton...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions