summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-04-18 00:01:53 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-05-04 15:03:27 +0200
commit5d8c8d0b1d4f501482277c1dc18b91686fd9b247 (patch)
tree907c680673dcf5409b456ac1fe58d9001863531d /ospfd
parentospfd: Cleanup some awful deep indentation in ospf_zebra.c (diff)
downloadfrr-5d8c8d0b1d4f501482277c1dc18b91686fd9b247.tar.xz
frr-5d8c8d0b1d4f501482277c1dc18b91686fd9b247.zip
ospfd: Do not use `case default` for switches that have enum
Found a couple spots where FRR was using `case default` when using a switch over an enum. In this case we *must* enumerate all states as part of the switch. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_sr.c3
-rw-r--r--ospfd/ospf_zebra.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index a7a2e0363..d003f3bf7 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -1689,7 +1689,8 @@ void ospf_sr_ext_itf_add(struct ext_itf *exti)
else
srl->nhlfe[1].nexthop = exti->rmt_itf_addr.value;
break;
- default:
+ case PREF_SID:
+ case LOCAL_SID:
/* Wrong SID Type. Abort! */
XFREE(MTYPE_OSPF_SR_PARAMS, srl);
return;
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 0d5194a3b..dfbb9aa2f 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -637,7 +637,8 @@ void ospf_zebra_update_prefix_sid(const struct sr_prefix *srp)
}
}
break;
- default:
+ case ADJ_SID:
+ case LAN_ADJ_SID:
return;
}