mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 07:37:29 +00:00
ospfd: null check (Coverity 1399284)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
3a743cb7ec
commit
162dbe419d
@ -670,6 +670,16 @@ int ospf_redistribute_set(struct ospf *ospf, int type, unsigned short instance,
|
|||||||
struct ospf_redist *red;
|
struct ospf_redist *red;
|
||||||
|
|
||||||
red = ospf_redist_lookup(ospf, type, instance);
|
red = ospf_redist_lookup(ospf, type, instance);
|
||||||
|
|
||||||
|
if (red == NULL) {
|
||||||
|
zlog_err(
|
||||||
|
"Redistribute[%s][%d]: Lookup failed Type[%d] , Metric[%d]",
|
||||||
|
ospf_redist_string(type), instance,
|
||||||
|
metric_type(ospf, type, instance),
|
||||||
|
metric_value(ospf, type, instance));
|
||||||
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
if (ospf_is_type_redistributed(ospf, type, instance)) {
|
if (ospf_is_type_redistributed(ospf, type, instance)) {
|
||||||
if (mtype != red->dmetric.type) {
|
if (mtype != red->dmetric.type) {
|
||||||
red->dmetric.type = mtype;
|
red->dmetric.type = mtype;
|
||||||
|
Loading…
Reference in New Issue
Block a user