From 9588ae79fa4ee90730302d9edb42dd86e790e6fd Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 30 May 2018 09:32:33 -0400 Subject: [PATCH] bgpd: Fix redundant or test The if statement had a second instance of the same variable to test as part of the statement. Found by SA. Signed-off-by: Donald Sharp --- bgpd/bgp_pbr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index 1054ea4027..5e36f91750 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -240,9 +240,8 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api) * - combination src/dst => drop * - combination srcport + @IP */ - if (api->match_icmp_type_num || api->match_icmp_type_num - || api->match_packet_length_num || api->match_dscp_num - || api->match_tcpflags_num) { + if (api->match_icmp_type_num || api->match_packet_length_num + || api->match_dscp_num || api->match_tcpflags_num) { if (BGP_DEBUG(pbr, PBR)) { bgp_pbr_print_policy_route(api); zlog_debug("BGP: some SET actions not supported by Zebra. ignoring."); -- 2.39.5