Commit 5c793473 authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Pavel Emelyanov

zdtm/net/ipv6: allow inacurate match for mldvX_unsolicited_report_interval

mldv1_unsolicited_report_interval and mldv2_unsolicited_report_interval
are rounded up to (MSEC_PER_SEC / HZ)*k when set as in kernel they are
saved in jiffies. As min HZ is 100, 10 is MAX_MSEC_GRANULARITY.
Signed-off-by: 's avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
Reviewed-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent cde72cab
......@@ -146,6 +146,8 @@ static int gen_conf(FILE *fp, int *conf, int *conf_rand,
return 0;
}
#define MAX_MSEC_GRANULARITY 10
static int check_conf(FILE *fp, int *conf, int *conf_rand,
struct range *range, char *path) {
int ret;
......@@ -163,6 +165,10 @@ static int check_conf(FILE *fp, int *conf, int *conf_rand,
if (val != *conf_rand) {
fail("Option \"%s\" changed from %d to %d",
path, *conf_rand, val);
if ((strstr(path, "mldv1_unsolicited_report_interval")
|| strstr(path, "mldv2_unsolicited_report_interval"))
&& val - *conf_rand < MAX_MSEC_GRANULARITY)
return 0;
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment