File: getaddrinfo

package info (click to toggle)
leafnode 1.11.8-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,608 kB
  • sloc: ansic: 10,915; sh: 1,750; xml: 628; makefile: 285; perl: 84; sed: 4
file content (17 lines) | stat: -rw-r--r-- 726 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Use AF_UNSPEC for getaddrinfo.
Origin: upstream commit 5e73cf9f7e7bfc41f1e17215bbb524c36d3d705f
Author: Matthias Andree <matthias.andree@gmx.de>

Index: leafnode-1.11.8/checkpeerlocal.c
===================================================================
--- leafnode-1.11.8.orig/checkpeerlocal.c	2010-05-28 01:07:34.000000000 +0200
+++ leafnode-1.11.8/checkpeerlocal.c	2012-04-06 15:53:23.754780376 +0200
@@ -473,7 +473,7 @@
 	    printf("\n");
 	printf("=== argument %s ===\n", argv[i]);
 	memset(&hints, 0, sizeof(hints));
-	hints.ai_family = strchr(argv[i], ':') ? AF_INET6 : AF_INET;
+	hints.ai_family = AF_UNSPEC;
 	hints.ai_socktype = SOCK_STREAM;
 	x = getaddrinfo(argv[i], NULL, &hints, &res);
 	if (x) {