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

[PATCH] Fixed git:// IPv4 address problem when compiled with -DNO_IPV6.

From
PSPaul Serice <paul@serice.net>
Date
Nov 22, 2005, 13:54 UTC
Message-ID
<4383230F.7060007@serice.net>

Failure to dereference a pointer caused incorrect initialization of the IPv4 address when calling connect() when compiled with -DNO_IPV6.

With this patch and yesterday's patch for git-daemon, it should now be possible to use the native git protocol for both the client and server on Cygwin.

Signed-off-by: Paul Serice <paul@serice.net>
---
 connect.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

applies-to: 5bc7f67c535dbbbb9340285c82226a8dd6e4afec b16765657940be2f4d14e8f1e65d35e4b32bea0f

diff --git a/connect.c b/connect.c
index 7a417e5..93f6f80 100644
--- a/connect.c
+++ b/connect.c
@@ -427,7 +427,7 @@ static int git_tcp_connect(int fd[2], co
 		memset(&sa, 0, sizeof sa);
 		sa.sin_family = he->h_addrtype;
 		sa.sin_port = htons(nport);
-		memcpy(&sa.sin_addr, ap, he->h_length);
+		memcpy(&sa.sin_addr, *ap, he->h_length);
 
 		if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) {
 			close(sockfd);
---
0.99.9.GIT
Message 1 of 1 in “Fixed git:// IPv4 address problem when compiled with -DNO_IPV6.”
  1. Fixed git:// IPv4 address problem when compiled with -DNO_IPV6.Paul Serice, Nov 22, 2005

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.