]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: clear misleading mismatched check
authoranlan_cs <vic.lan@pica8.com>
Tue, 26 Apr 2022 04:14:34 +0000 (00:14 -0400)
committeranlan_cs <vic.lan@pica8.com>
Sun, 8 May 2022 02:20:15 +0000 (22:20 -0400)
commit17151ae94bd9ddc2eab6a9b1c5fcfea3e53defe3
treee6ba9632deb71cc3a68496321246260d3495914a
parent50f1f2e724f8614ada1a1a02dd28f1ff3af06e08
bgpd: clear misleading mismatched check

Two changes for `delete_global_type2_routes()`:

1) Remove check of `bgp_dest_has_bgp_path_info_data(rddest)`.
It is unnecessary(`dest->info` should not be NULL) and misleading.
`if (rddest && bgp_dest_has_bgp_path_info_data(rddest))`
Use (locked) node with this check, but unlock with `if (rddest)`,
The mismatched condition is misleading, there seems to be a
mistake to extra unlock.
Just make it clear, immediately exit with `(!rddest)`.

2) Remove checking returned value for it, and use `void` as return type.
It is unnecessary and wrong. Even the check failed, it should continue
to delete other types of routes.
Just remove the check and go through.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
bgpd/bgp_evpn.c