mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
small optimizations
This commit is contained in:
@@ -991,12 +991,13 @@ time_t now;
|
||||
now = time(0);
|
||||
|
||||
if (ws->session == ts) {
|
||||
ws->last_dpd_tcp = now;
|
||||
ret = tls_send(ts, "STF\x01\x00\x00\x04\x00", 8);
|
||||
|
||||
ws->last_dpd_tcp = time(0);
|
||||
oclog(ws, LOG_DEBUG, "received TLS DPD; sent response (%d bytes)", ret);
|
||||
} else {
|
||||
/* Use DPD for MTU discovery in DTLS */
|
||||
ws->last_dpd_udp = now;
|
||||
ws->buffer[0] = 0x04;
|
||||
|
||||
/* if we received a dpd sooner than expected reply with minimal
|
||||
@@ -1021,7 +1022,6 @@ time_t now;
|
||||
mtu_ok(ws);
|
||||
}
|
||||
|
||||
ws->last_dpd_udp = time(0);
|
||||
oclog(ws, LOG_DEBUG, "received DTLS DPD; sent response (%d bytes)", ret);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user