mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
Corrected auto-detection of the address.
This commit is contained in:
@@ -88,11 +88,11 @@ int get_ips(struct worker_st *ws, struct vpn_st *vinfo, char **buffer,
|
|||||||
if (ifa->ifa_addr->sa_family == AF_INET) {
|
if (ifa->ifa_addr->sa_family == AF_INET) {
|
||||||
if (strcmp(p, "0.0.0.0") == 0)
|
if (strcmp(p, "0.0.0.0") == 0)
|
||||||
p = NULL;
|
p = NULL;
|
||||||
vinfo->ipv4 = p;
|
vinfo->ipv4_local = p;
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(p, "::") == 0)
|
if (strcmp(p, "::") == 0)
|
||||||
p = NULL;
|
p = NULL;
|
||||||
vinfo->ipv6 = p;
|
vinfo->ipv6_local = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DST */
|
/* DST */
|
||||||
@@ -116,11 +116,11 @@ int get_ips(struct worker_st *ws, struct vpn_st *vinfo, char **buffer,
|
|||||||
if (ifa->ifa_dstaddr->sa_family == AF_INET) {
|
if (ifa->ifa_dstaddr->sa_family == AF_INET) {
|
||||||
if (strcmp(p, "0.0.0.0") == 0)
|
if (strcmp(p, "0.0.0.0") == 0)
|
||||||
p = NULL;
|
p = NULL;
|
||||||
vinfo->ipv4_local = p;
|
vinfo->ipv4 = p;
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(p, "::") == 0)
|
if (strcmp(p, "::") == 0)
|
||||||
p = NULL;
|
p = NULL;
|
||||||
vinfo->ipv6_local = p;
|
vinfo->ipv6 = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user