(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:
@@ -113,26 +113,23 @@ parse_ports(const char *str)
|
||||
if(strcmp(p, "+") == 0) {
|
||||
#ifdef HAVE_IPV6
|
||||
add_standard_ports(AF_INET6);
|
||||
#else
|
||||
add_standard_ports(AF_INET);
|
||||
#endif
|
||||
add_standard_ports(AF_INET);
|
||||
} else {
|
||||
char *q = strchr(p, '/');
|
||||
if(q){
|
||||
*q++ = 0;
|
||||
#ifdef HAVE_IPV6
|
||||
add_port(AF_INET6, p, q);
|
||||
#else
|
||||
add_port(AF_INET, p, q);
|
||||
#endif
|
||||
add_port(AF_INET, p, q);
|
||||
}else {
|
||||
#ifdef HAVE_IPV6
|
||||
add_port(AF_INET6, p, "udp");
|
||||
add_port(AF_INET6, p, "tcp");
|
||||
#else
|
||||
#endif
|
||||
add_port(AF_INET, p, "udp");
|
||||
add_port(AF_INET, p, "tcp");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user