diff --git a/src/common.h b/src/common.h index a53930a..6a1aeb0 100644 --- a/src/common.h +++ b/src/common.h @@ -54,7 +54,7 @@ #define DEFAULT_RETRY_MAX_INTERVAL 60 #define DEFAULT_AMD_VERSION 5 #define DEFAULT_INSTANCE_MODE 0 -#define DEFAULT_SESSION_TIMEOUT 60 +#define DEFAULT_SESSION_TIMEOUT 300 #define MAX_NBRE_SERVICES 256 #define FIREWALL_CWMP "/etc/firewall.cwmp" #define CWMP_VARSTATE_UCI_PACKAGE "/var/state/cwmp" diff --git a/src/http.c b/src/http.c index fbfe440..43556dd 100644 --- a/src/http.c +++ b/src/http.c @@ -377,7 +377,7 @@ static void http_cr_new_client(int client, bool service_available) } CWMP_LOG(INFO, "Received host: (%s)", request_host); - int auth_check = validate_http_digest_auth("GET", cwmp_main.conf.connection_request_path, auth_digest_buffer + strlen("Authorization: Digest "), REALM, username, password, 300, request_host); + int auth_check = validate_http_digest_auth("GET", cwmp_main.conf.connection_request_path, auth_digest_buffer + strlen("Authorization: Digest "), REALM, username, password, cwmp_main.conf.session_timeout, request_host); if (auth_check == -1) { /* invalid nonce */ internal_error = true; goto http_end;