Currently the prefix length M must be less than Y.
Relax this restriction to allow M to be less than or equal
to Y.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
/*
* Check rule:
- * prefix length < ge.
+ * prefix length <= ge.
*/
if (yang_dnode_exists(args->dnode, xpath_ge)) {
ge = yang_dnode_get_uint8(args->dnode, xpath_ge);
- if (p.prefixlen >= ge)
+ if (p.prefixlen > ge)
goto log_and_fail;
}
log_and_fail:
snprintfrr(
args->errmsg, args->errmsg_len,
- "Invalid prefix range for %pFX: Make sure that mask length < ge <= le",
+ "Invalid prefix range for %pFX: Make sure that mask length <= ge <= le",
&p);
return NB_ERR_VALIDATION;
}