net/enic: fix UDP port in flow director
authorJohn Daley <johndale@cisco.com>
Tue, 18 Oct 2016 05:17:08 +0000 (22:17 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 26 Oct 2016 17:38:18 +0000 (19:38 +0200)
This fixes issue found by Coverity where a typo caused the flow director
UDP IPv4 source port mask to be assigned the destination port mask
supplied by the caller.

Coverity issue: 137860
Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series")

Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_clsf.c

index 85ae5ec..bcf479a 100644 (file)
@@ -155,7 +155,7 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
                        udp_val.src_port = input->flow.udp4_flow.src_port;
                }
                if (input->flow.udp4_flow.dst_port) {
-                       udp_mask.src_port = masks->dst_port_mask;
+                       udp_mask.dst_port = masks->dst_port_mask;
                        udp_val.dst_port = input->flow.udp4_flow.dst_port;
                }