mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 06:14:09 +00:00
Fix bug #52911: SNMPv3 time window check is not the same as RFC3414
This commit is contained in:
parent
72fc4a6ca5
commit
51369854b5
@ -1051,13 +1051,13 @@ snmp_parse_inbound_frame(struct snmp_request *request)
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
s32_t time = snmpv3_get_engine_time_internal();
|
s32_t time = snmpv3_get_engine_time_internal();
|
||||||
if (request->msg_authoritative_engine_time > time) {
|
if (request->msg_authoritative_engine_time > (time + 150)) {
|
||||||
snmp_stats.notintimewindows++;
|
snmp_stats.notintimewindows++;
|
||||||
request->msg_flags = SNMP_V3_AUTHNOPRIV;
|
request->msg_flags = SNMP_V3_AUTHNOPRIV;
|
||||||
request->error_status = SNMP_ERR_NOTINTIMEWINDOW;
|
request->error_status = SNMP_ERR_NOTINTIMEWINDOW;
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
} else if (time > 150) {
|
} else if (time > 150) {
|
||||||
if (request->msg_authoritative_engine_time < time - 150) {
|
if (request->msg_authoritative_engine_time < (time - 150)) {
|
||||||
snmp_stats.notintimewindows++;
|
snmp_stats.notintimewindows++;
|
||||||
request->msg_flags = SNMP_V3_AUTHNOPRIV;
|
request->msg_flags = SNMP_V3_AUTHNOPRIV;
|
||||||
request->error_status = SNMP_ERR_NOTINTIMEWINDOW;
|
request->error_status = SNMP_ERR_NOTINTIMEWINDOW;
|
||||||
|
Loading…
Reference in New Issue
Block a user