diff options
author | Wes Campaigne <westacular@gmail.com> | 2011-02-21 19:10:10 -0500 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-02-22 03:54:28 +0100 |
commit | 64230aa45c5ad8505d81812d19bd2ee9a37e3467 (patch) | |
tree | d1b0820bc83da9801929a24b674a6e39aa780816 /xtables.c | |
parent | 4b110b426df7bf486a3e7884c56ebb3487023601 (diff) |
libxtables: avoid confusing use of ai_protocol=IPPROTO_IPV6
[Split hunk from Wes's submission. Added commit message. -j.eng]
ai_protocol normally specifies the L4 protocol one wants to
specifically inquire about when a service (2nd parameter to
getaddrinfo) is specified. Such a service lookup would potentially
yield nothing, because there just is not any "mytunnel 2222/ipv6" in
/etc/services, since IPPROTO_IPV6 itself is not a protocol with a
concept of (port-based) services to begin with.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'xtables.c')
-rw-r--r-- | xtables.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -1424,8 +1424,6 @@ host_to_ip6addr(const char *name, unsigned int *naddr) hints.ai_flags = AI_CANONNAME; hints.ai_family = AF_INET6; hints.ai_socktype = SOCK_RAW; - hints.ai_protocol = IPPROTO_IPV6; - hints.ai_next = NULL; *naddr = 0; if ((err = getaddrinfo(name, NULL, &hints, &res)) != 0) { |