git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/6] tcp: unify ipv4 and ipv6 code paths

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jun 6, 2011, 10:01 UTC
Message-ID
<20110606100147.GN8015@elie>
In-Reply-To
<20110606094128.GJ8015@elie>
Jonathan Nieder wrote:
>                  tells getaddrinfo to restrict attention to TCP
> services after this patch.  That should make a difference because the
> service parameter is NULL.

Sorry, the last sentence should say "That should _not_ make a difference". You would be able to tell the difference between the before and after with "strace git daemon" because of the ai_socktype and ai_protocol settings:

[...]
Show 13 quoted lines
> +int dns_resolve(const char *host, const char *port, int flags,
> +		resolver_result *res)
> +{
> +	struct addrinfo hints;
> +	int gai;
> +
> +	memset(&hints, 0, sizeof(hints));
> +	if (flags & RESOLVE_CANONNAME)
> +		hints.ai_flags = AI_CANONNAME;
> +	hints.ai_socktype = SOCK_STREAM;
> +	hints.ai_protocol = IPPROTO_TCP;
> +
> +	gai = getaddrinfo(host, port, &hints, res);

but I don't think the effect is any different --- the ai_socktype and protocol hints are for getservbyname functionality and the code that cares about it was already passing those hints.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 7 of 9 in “git: please honor DNS SRV records”
  1. 0/6 git: please honor DNS SRV recordsJonathan Nieder, Jun 6, 2011
  2. 1/6 transport: expose git_tcp_connect and friends in new tcp.hJonathan Nieder, Jun 6, 2011
  3. 2/6 daemon: make host resolution into a separate functionJonathan Nieder, Jun 6, 2011
  4. 3/6 daemon: move locate_host to tcp.cJonathan Nieder, Jun 6, 2011
  5. 4/6 transport: fix index in ipv6 connection failed messageJonathan Nieder, Jun 6, 2011
  6. 5/6 tcp: unify ipv4 and ipv6 code pathsJonathan Nieder, Jun 6, 2011
  7. Jonathan NiederJun 6, 2011
  8. 6/6 transport: learn to honor DNS SRV recordsJonathan Nieder, Jun 6, 2011
  9. Jonathan NiederJun 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.