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

Re: [PATCH/RFC] daemon.c: replace inet_ntop with getnameinfo

From
Benjamin Kramer <benny.kra@googlemail.com>
Date
May 7, 2009, 14:30 UTC
Message-ID
<4A02F093.50003@googlemail.com>
In-Reply-To
<4A02DEE3.1080006@viscovery.net>
Johannes Sixt schrieb:
Show 5 quoted lines
> 
> I don't particularly care about git-daemon on Windows at this time because
> we don't build it anyway. But others have already had limited success, and
> they might care since getnameinfo() is not available. If we did have IPv6
> support on Windows, we would indeed have troubles with those path names.

The getnameinfo(3) code is in a #ifndef NO_IPV6 block anyways, so it won't hurt non-ipv6 builds. afaik getnameinfo(3) is available when getaddrinfo(3) is and that seems to be the case on newer windows versions.

Show 8 quoted lines
> But even on non-Windows, a directory name with colons does not look kosher
> to me. Don't they look like PATH values? Or like remote addresses? Are
> IPv6 addresses used in this way by other software?
> 
> Moreover, I think that since IPv6 addresses can have at most one '::'
> abbreviation, but not in an unambiguous way, users of path-interpolation
> of IPv6 addresses are at the mercy of whether and how getnameinfo() makes
> use of '::'.

I did a quick test with apache's VirtualDocumentRootIP and it looks like they are using :: only when it's unambigous. And yes, they use colons in the file name.

::1 stays ::1
2001:db8::abab:abab:0:abab:abab becomes 2001:db8:0:abab:abab:0:abab:abab

I don't know if they also use colons on windows because I don't have a windows box with IPv6 to test.

-->8-->8--

httpd.conf: VirtualDocumentRootIP /foo/bar/%0

now point your browser to http://[::1]/ and watch your logs.
Previous: Johannes SixtNext: Jakub Narebski
Message 5 of 8 in “daemon.c: replace inet_ntop with getnameinfo”
  1. daemon.c: replace inet_ntop with getnameinfoBenjamin Kramer, May 7, 2009
  2. Andreas EricssonMay 7, 2009
  3. Benjamin KramerMay 7, 2009
  4. Johannes SixtMay 7, 2009
  5. Benjamin KramerMay 7, 2009
  6. Jakub NarebskiMay 7, 2009
  7. Brian GernhardtMay 7, 2009
  8. Miles BaderMay 7, 2009

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.