Fixed IPv6 socket setup.
FossilOrigin-Name: 659f7ef49476b7ad20873cd79acf6ee47ad479b82169e252d75ba94b0ea4511b
This commit is contained in:
@ -389,8 +389,9 @@ static int init_listen_addrs()
|
||||
}
|
||||
|
||||
if (ifa->ifa_addr->sa_family == AF_INET && conf_ipv4) {
|
||||
sock_addrtostr(ifa->ifa_addr, str, 100,1);
|
||||
*strchr(str, ':') = 0;
|
||||
sock_addrtostr(ifa->ifa_addr, str, 100,0);
|
||||
printf("The converter has %s\n",str);
|
||||
// *strchr(str, ':') = 0;
|
||||
conf_listen_addrs[ctr] =
|
||||
(char *) cw_setstr((uint8_t **) & conf_listen_addrs[ctr],
|
||||
(uint8_t *) str, strlen(str));
|
||||
@ -398,9 +399,11 @@ static int init_listen_addrs()
|
||||
ctr++;
|
||||
|
||||
}
|
||||
#ifdef WITH_IPV6
|
||||
if (ifa->ifa_addr->sa_family == AF_INET6 && conf_ipv6) {
|
||||
sock_addrtostr(ifa->ifa_addr, str, 100,1);
|
||||
sock_addrtostr(ifa->ifa_addr, str, 100,0);
|
||||
|
||||
printf("The converter has %s\n",str);
|
||||
|
||||
if (strncmp(str, "fe80:", 5) == 0) {
|
||||
strcat(str, "%");
|
||||
strcat(str, ifa->ifa_name);
|
||||
@ -411,7 +414,6 @@ static int init_listen_addrs()
|
||||
if (conf_listen_addrs[ctr])
|
||||
ctr++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
conf_listen_addrs_len = ctr;
|
||||
rc = 1;
|
||||
|
||||
Reference in New Issue
Block a user