Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 852
    • Issues 852
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !664

socket test: Use loopback for connecting, not 0.0.0.0

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed LRN requested to merge lrn/glib:cherry-pick-d2f0ead into master Feb 13, 2019
  • Overview 1
  • Commits 1
  • Pipelines 1
  • Changes 1

getsockname() returns the address that the socket was bound to. If it was bound to INADDR_ANY, getsockname() will stubbornly return INADDR_ANY (and someport - that one is valid). Subsequent connection attempts to INADDR_ANY:someport will fail with winsock. Actually, it doesn't make even sense to connect to INADDR_ANY at all (where is the socket connecting to? To a random interface of the host?), so this is just a straight-up change, without platform-specific ifdefing.

Use loopback instead of INADDR_ANY.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: cherry-pick-d2f0ead