(parse_prots): always bind to AF_INET, there are v6-implementations

without support for `mapped V4 addresses'.  From Jun-ichiro itojun
Hagino <itojun@kame.net>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5318 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-01-31 05:26:29 +00:00
parent e94157b5cb
commit 5edb3c3759

View File

@@ -113,26 +113,23 @@ parse_ports(const char *str)
if(strcmp(p, "+") == 0) { if(strcmp(p, "+") == 0) {
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
add_standard_ports(AF_INET6); add_standard_ports(AF_INET6);
#else
add_standard_ports(AF_INET);
#endif #endif
add_standard_ports(AF_INET);
} else { } else {
char *q = strchr(p, '/'); char *q = strchr(p, '/');
if(q){ if(q){
*q++ = 0; *q++ = 0;
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
add_port(AF_INET6, p, q); add_port(AF_INET6, p, q);
#else
add_port(AF_INET, p, q);
#endif #endif
add_port(AF_INET, p, q);
}else { }else {
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
add_port(AF_INET6, p, "udp"); add_port(AF_INET6, p, "udp");
add_port(AF_INET6, p, "tcp"); add_port(AF_INET6, p, "tcp");
#else #endif
add_port(AF_INET, p, "udp"); add_port(AF_INET, p, "udp");
add_port(AF_INET, p, "tcp"); add_port(AF_INET, p, "tcp");
#endif
} }
} }