radcli icon indicating copy to clipboard operation
radcli copied to clipboard

Allow zero for retries and timeout in the configuration

Open maersk- opened this issue 1 year ago • 1 comments

The rc_test_config() method does not allow retries and timeout values of zero. The following checks are made:

if (rc_conf_int(rh, "radius_timeout") <= 0)
{
	rc_log(LOG_ERR,"%s: radius_timeout <= 0 is illegal", filename);
	return -1;
}
if (rc_conf_int(rh, "radius_retries") <= 0)
{
	rc_log(LOG_ERR,"%s: radius_retries <= 0 is illegal", filename);
	return -1;
}

In my opinion using 0 and just checking <0 would be completely fine.

maersk- avatar Apr 16 '24 07:04 maersk-

Would you like to suggest a patch and introduce the necessary tests?

nmav avatar Apr 27 '24 18:04 nmav