mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
print IPv6 netmask only when in non-full mode
Also use the network address if available to print netmask.
This commit is contained in:
@@ -1554,16 +1554,22 @@ static int connect_handler(worker_st * ws)
|
||||
ws->vinfo.ipv6, ws->vinfo.ipv6_prefix);
|
||||
SEND_ERR(ret);
|
||||
} else {
|
||||
const char *net;
|
||||
|
||||
ret =
|
||||
cstp_printf(ws, "X-CSTP-Address: %s\r\n",
|
||||
ws->vinfo.ipv6);
|
||||
SEND_ERR(ret);
|
||||
}
|
||||
|
||||
ret =
|
||||
cstp_printf(ws, "X-CSTP-Netmask: %s/%u\r\n",
|
||||
ws->vinfo.ipv6, ws->vinfo.ipv6_prefix);
|
||||
SEND_ERR(ret);
|
||||
net = ws->vinfo.ipv6_network;
|
||||
if (net == NULL)
|
||||
net = ws->vinfo.ipv6;
|
||||
|
||||
ret =
|
||||
cstp_printf(ws, "X-CSTP-Netmask: %s/%u\r\n",
|
||||
net, ws->vinfo.ipv6_prefix);
|
||||
SEND_ERR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ws->vinfo.dns_size; i++) {
|
||||
|
||||
Reference in New Issue
Block a user