]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Remove double check against match_packet_length_num
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 11 Jun 2021 15:18:59 +0000 (18:18 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 17 Jun 2021 07:14:38 +0000 (10:14 +0300)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_flowspec_util.c

index b244c872580771b7ef5274149c6021c1d754ed06..23baa0184e4e2980e71b80e7404d0b8c603787ab 100644 (file)
@@ -641,13 +641,12 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len,
                                 __func__, type);
                }
        }
-       if (bpem->match_packet_length_num || bpem->match_fragment_num ||
-           bpem->match_tcpflags_num || bpem->match_dscp_num ||
-           bpem->match_packet_length_num || bpem->match_icmp_code_num ||
-           bpem->match_icmp_type_num || bpem->match_port_num ||
-           bpem->match_src_port_num || bpem->match_dst_port_num ||
-           bpem->match_protocol_num || bpem->match_bitmask ||
-           bpem->match_flowlabel_num)
+       if (bpem->match_packet_length_num || bpem->match_fragment_num
+           || bpem->match_tcpflags_num || bpem->match_dscp_num
+           || bpem->match_icmp_code_num || bpem->match_icmp_type_num
+           || bpem->match_port_num || bpem->match_src_port_num
+           || bpem->match_dst_port_num || bpem->match_protocol_num
+           || bpem->match_bitmask || bpem->match_flowlabel_num)
                bpem->type = BGP_PBR_IPSET;
        else if ((bpem->match_bitmask_iprule & PREFIX_SRC_PRESENT) ||
                 (bpem->match_bitmask_iprule & PREFIX_DST_PRESENT))