Skip to content

Commit

Permalink
Merge pull request #7537 from ton31337/fix/zebra_set_src_7.5
Browse files Browse the repository at this point in the history
zebra: [7.5] Allow `set src X` to work on startup
  • Loading branch information
riw777 authored Nov 17, 2020
2 parents 4ed6312 + b5617fb commit 9125241
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions zebra/zebra_nb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1552,12 +1552,14 @@ int lib_route_map_entry_set_action_source_v4_modify(
if (pif != NULL)
break;
}
if (pif == NULL) {
snprintf(args->errmsg, args->errmsg_len,
"is not a local adddress: %s",
yang_dnode_get_string(args->dnode, NULL));
return NB_ERR_VALIDATION;
}
/*
* On startup the local address *may* not have come up
* yet. We need to allow startup configuration of
* set src or we are fudged. Log it for future fun
*/
if (pif == NULL)
zlog_warn("set src %pI4 is not a local address",
&p.u.prefix4);
return NB_OK;
case NB_EV_PREPARE:
case NB_EV_ABORT:
Expand Down Expand Up @@ -1620,12 +1622,14 @@ int lib_route_map_entry_set_action_source_v6_modify(
if (pif != NULL)
break;
}
if (pif == NULL) {
snprintf(args->errmsg, args->errmsg_len,
"is not a local adddress: %s",
yang_dnode_get_string(args->dnode, NULL));
return NB_ERR_VALIDATION;
}
/*
* On startup the local address *may* not have come up
* yet. We need to allow startup configuration of
* set src or we are fudged. Log it for future fun
*/
if (pif == NULL)
zlog_warn("set src %pI6 is not a local address",
&p.u.prefix6);
return NB_OK;
case NB_EV_PREPARE:
case NB_EV_ABORT:
Expand Down

0 comments on commit 9125241

Please sign in to comment.