All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Julien Cristau <jcristau@debian.org>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Ilari Liusvaara <ilari.liusvaara@elisanet.fi>,
	"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH 5/6] tcp: unify ipv4 and ipv6 code paths
Date: Mon, 6 Jun 2011 05:01:47 -0500	[thread overview]
Message-ID: <20110606100147.GN8015@elie> (raw)
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:

[...]
> +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.

  reply	other threads:[~2011-06-06 10:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110524202249.GA5889@elie>
     [not found] ` <20110524230900.GA9440@radis.liafa.jussieu.fr>
2011-06-06  9:30   ` [RFC/PATCH 0/6] git: please honor DNS SRV records Jonathan Nieder
2011-06-06  9:37     ` [PATCH 1/6] transport: expose git_tcp_connect and friends in new tcp.h Jonathan Nieder
2011-06-06  9:38     ` [PATCH 2/6] daemon: make host resolution into a separate function Jonathan Nieder
2011-06-06  9:39     ` [PATCH 3/6] daemon: move locate_host to tcp.c Jonathan Nieder
2011-06-06  9:40     ` [PATCH 4/6] transport: fix index in ipv6 connection failed message Jonathan Nieder
2011-06-06  9:41     ` [PATCH 5/6] tcp: unify ipv4 and ipv6 code paths Jonathan Nieder
2011-06-06 10:01       ` Jonathan Nieder [this message]
2011-06-06  9:46     ` [PATCH 6/6] transport: learn to honor DNS SRV records Jonathan Nieder
2011-06-06  9:49     ` [RFC/PATCH 0/6] git: please " Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110606100147.GN8015@elie \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ilari.liusvaara@elisanet.fi \
    --cc=jcristau@debian.org \
    --cc=peff@peff.net \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.