libevent / libevent/libevent

pass through dns errors to the caller

Open
#740 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

subsystem:http type:enhancement
Dominant language
C
Stars
12k
Forks
3.5k
Avg merge
12h 55m
Merged PRs (30d)
6

Description

There's no way to determine why evhttp_bind_socket_with_handle failed if getaddrinfo returns an error.

Fixing this is complicated by the fact that getaddrinfo returns errors of its own type, which could potentially overlap with standard socket error values; therefore, it wouldn't be sufficient to simply EVUTIL_SET_SOCKET_ERROR with the return value.

(Note that our application actually needs the specific getaddrinfo failure reason; see https://github.com/bitcoin/bitcoin/pull/14968)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at evhttp_bind_socket_with_handle and trace the getaddrinfo failure path. Determine how the specific getaddrinfo failure reason can reach the caller without confusing it with standard socket errors; done means callers can distinguish the original resolution failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.