Merge branch 'add-logging-ipv6' into 'master'

Add logging output when IPv6 is disabled.

See merge request openconnect/ocserv!90
This commit is contained in:
Nikos Mavrogiannopoulos
2018-11-19 05:42:43 +00:00

View File

@@ -1969,8 +1969,13 @@ static int connect_handler(worker_st * ws)
/* While anyconnect clients can handle the assignment
* of an IPv6 address, they cannot handle routes or DNS
* in IPv6. So we disable IPv6 after an IP is assigned. */
if (ws->full_ipv6 == 0 || req->user_agent_type != AGENT_OPENCONNECT)
if (ws->full_ipv6 == 0) {
req->no_ipv6 = 1;
oclog(ws, LOG_INFO, "IPv6 routes/DNS disabled because IPv6 support was not requested.");
} else if (req->user_agent_type != AGENT_OPENCONNECT) {
req->no_ipv6 = 1;
oclog(ws, LOG_INFO, "IPv6 routes/DNS disabled because the agent is not openconnect.");
}
for (i = 0; i < ws->user_config->n_dns; i++) {
if (strchr(ws->user_config->dns[i], ':') != 0)