diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-11 18:18:59 +0300 | 
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-17 10:14:38 +0300 | 
| commit | 734c6f0953065a2b6a0637843b56a6bbb1402e53 (patch) | |
| tree | fd466787dc05c249c0bc50e85ba10fbcf75af2c4 /bgpd/bgp_flowspec_util.c | |
| parent | 63fc789a109cf5e086d7494cea7a9f516550839c (diff) | |
bgpd: Remove double check against match_packet_length_num
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_flowspec_util.c')
| -rw-r--r-- | bgpd/bgp_flowspec_util.c | 13 | 
1 files changed, 6 insertions, 7 deletions
diff --git a/bgpd/bgp_flowspec_util.c b/bgpd/bgp_flowspec_util.c index b244c87258..23baa0184e 100644 --- a/bgpd/bgp_flowspec_util.c +++ b/bgpd/bgp_flowspec_util.c @@ -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))  | 
