summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranlan_cs <vic.lan@pica8.com>2022-08-01 07:37:51 -0400
committeranlan_cs <vic.lan@pica8.com>2022-08-02 21:09:33 -0400
commit22ce5803e4009a0dc124134078cc8aa2ff10db00 (patch)
tree64b03cf300ff92383cb1cf9f926af823de708262
parente279bfdf064ea020c6c009d17719616065e5f82f (diff)
ospf6d: combine two conditions for lsa prefix
For both router and network LSAs, combine the two conditions and process lsa prefix uniformly. Signed-off-by: anlan_cs <vic.lan@pica8.com>
-rw-r--r--ospf6d/ospf6_intra.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index b5ea3ada36..52bb745d74 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -1765,10 +1765,8 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa)
intra_prefix_lsa =
(struct ospf6_intra_prefix_lsa *)OSPF6_LSA_HEADER_END(
lsa->header);
- if (intra_prefix_lsa->ref_type == htons(OSPF6_LSTYPE_ROUTER))
- ospf6_linkstate_prefix(intra_prefix_lsa->ref_adv_router,
- intra_prefix_lsa->ref_id, &ls_prefix);
- else if (intra_prefix_lsa->ref_type == htons(OSPF6_LSTYPE_NETWORK))
+ if (intra_prefix_lsa->ref_type == htons(OSPF6_LSTYPE_ROUTER) ||
+ intra_prefix_lsa->ref_type == htons(OSPF6_LSTYPE_NETWORK))
ospf6_linkstate_prefix(intra_prefix_lsa->ref_adv_router,
intra_prefix_lsa->ref_id, &ls_prefix);
else {