/* Check that the block size does not exceed 65535 */
if ((srgb_ubound - srgb_lbound + 1) > 65535) {
- zlog_warn(
+ snprintf(
+ args->errmsg, args->errmsg_len,
"New SR Global Block (%u/%u) exceed the limit of 65535",
srgb_lbound, srgb_ubound);
return NB_ERR_VALIDATION;
/* Validate SRGB against SRLB */
if (!((srgb_ubound < srlb_lbound) || (srgb_lbound > srlb_ubound))) {
- zlog_warn(
+ snprintf(
+ args->errmsg, args->errmsg_len,
"New SR Global Block (%u/%u) conflict with Local Block (%u/%u)",
srgb_lbound, srgb_ubound, srlb_lbound, srlb_ubound);
return NB_ERR_VALIDATION;
switch (args->event) {
case NB_EV_VALIDATE:
if (!IS_MPLS_UNRESERVED_LABEL(lower_bound)) {
- zlog_warn("Invalid SRGB lower bound: %u",
- lower_bound);
+ snprintf(args->errmsg, args->errmsg_len,
+ "Invalid SRGB lower bound: %u", lower_bound);
return NB_ERR_VALIDATION;
}
break;
switch (args->event) {
case NB_EV_VALIDATE:
if (!IS_MPLS_UNRESERVED_LABEL(upper_bound)) {
- zlog_warn("Invalid SRGB upper bound: %u",
- upper_bound);
+ snprintf(args->errmsg, args->errmsg_len,
+ "Invalid SRGB upper bound: %u", upper_bound);
return NB_ERR_VALIDATION;
}
break;
/* Check that the block size does not exceed 65535 */
if ((srlb_ubound - srlb_lbound + 1) > 65535) {
- zlog_warn(
- "New SR Local Block (%u/%u) exceed the limit of 65535",
- srlb_lbound, srlb_ubound);
+ snprintf(args->errmsg, args->errmsg_len,
+ "New SR Local Block (%u/%u) exceed the limit of 65535",
+ srlb_lbound, srlb_ubound);
return NB_ERR_VALIDATION;
}
/* Validate SRLB against SRGB */
if (!((srlb_ubound < srgb_lbound) || (srlb_lbound > srgb_ubound))) {
- zlog_warn(
+ snprintf(
+ args->errmsg, args->errmsg_len,
"New SR Local Block (%u/%u) conflict with Global Block (%u/%u)",
srlb_lbound, srlb_ubound, srgb_lbound, srgb_ubound);
return NB_ERR_VALIDATION;
switch (args->event) {
case NB_EV_VALIDATE:
if (!IS_MPLS_UNRESERVED_LABEL(lower_bound)) {
- zlog_warn("Invalid SRLB lower bound: %u",
- lower_bound);
+ snprintf(args->errmsg, args->errmsg_len,
+ "Invalid SRLB lower bound: %u", lower_bound);
return NB_ERR_VALIDATION;
}
break;
switch (args->event) {
case NB_EV_VALIDATE:
if (!IS_MPLS_UNRESERVED_LABEL(upper_bound)) {
- zlog_warn("Invalid SRLB upper bound: %u",
- upper_bound);
+ snprintf(args->errmsg, args->errmsg_len,
+ "Invalid SRLB upper bound: %u", upper_bound);
return NB_ERR_VALIDATION;
}
break;
switch (sid_type) {
case SR_SID_VALUE_TYPE_INDEX:
if (sid >= srgb_range) {
- zlog_warn("SID index %u falls outside local SRGB range",
- sid);
+ snprintf(args->errmsg, args->errmsg_len,
+ "SID index %u falls outside local SRGB range",
+ sid);
return NB_ERR_VALIDATION;
}
break;
case SR_SID_VALUE_TYPE_ABSOLUTE:
if (!IS_MPLS_UNRESERVED_LABEL(sid)) {
- zlog_warn("Invalid absolute SID %u", sid);
+ snprintf(args->errmsg, args->errmsg_len,
+ "Invalid absolute SID %u", sid);
return NB_ERR_VALIDATION;
}
SET_FLAG(psid.flags, ISIS_PREFIX_SID_VALUE);