Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
G
graphviz
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 1,165
    • Issues 1,165
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • graphviz
  • graphviz
  • Issues
  • #316

Closed
Open
Opened Jul 04, 2016 by Steve (Gadget) Barnes@GadgetSteve
  • Report abuse
  • New issue
Report abuse New issue

[Dotty/Lneato/Lefty] io.c uses obsoleted function gethostbyname

Ported Issue from Mantis Original ID: 2387 Attachments may only be available from the Mantis Tracker Reported By: Jaroslav Skarvada

SEVERITY: MINOR Submitted: 2013-10-30 17:24:01

PLATFORM: LINUX

DESCRIPTION

From the manual page:

The gethostbyname_() and gethostbyaddr_() functions are obsolete. Applications should use getaddrinfo(3) and getnameinfo(3) instead.

AFAIK, among the others, the getaddrinfo implements the RFC 3484, so it may be better for IPv6 or dual stack machines.

STEPS TO REPRODUCE

Check the code.

ADDITIONAL INFORMATION

The code from the attached patch tries to connect to the first IP the OS things is the most suitable for the connection. In practice on dual stack machines this mostly means: if the hostname resolves to both IPv4 and IPv6 IPs and IPv6 is up, the IPv6 IP is taken.

Such approach can fail if there is e.g. internal IPv6 connectivity but no external IPv6 connectivity and the AAAA records of external hostnames are still resolvable. For such cases we could retry all the returned IPs one by one in a simple loop. This would be more robust approach, but it could cause big timeouts if the network connection suddenly drops after the getaddrinfo call.

Related issues

  • Discussion
  • Designs
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: graphviz/graphviz#316