aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2014-10-17 16:56:31 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-17 23:54:02 -0400
commit25ef1328a03c72a7285883d5b337c4b602476ecd (patch)
tree6179cf1f66d00161f84ed0e022b616fc1d65aeee /net
parentdc8e54165f1dc8ee946c953512a877676f8bbe3f (diff)
openvswitch: Set flow-key members.
This patch adds missing memset which are required to initialize flow key member. For example for IP flow we need to initialize ip.frag for all cases. Found by inspection. This bug is introduced by commit 0714812134d7dcadeb7ecfbfeb18788aa7e1eaac ("openvswitch: Eliminate memset() from flow_extract"). Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/openvswitch/flow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index c5cfc72a5535..2b78789ea7c5 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -274,6 +274,8 @@ static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key)
274 key->ip.frag = OVS_FRAG_TYPE_LATER; 274 key->ip.frag = OVS_FRAG_TYPE_LATER;
275 else 275 else
276 key->ip.frag = OVS_FRAG_TYPE_FIRST; 276 key->ip.frag = OVS_FRAG_TYPE_FIRST;
277 } else {
278 key->ip.frag = OVS_FRAG_TYPE_NONE;
277 } 279 }
278 280
279 nh_len = payload_ofs - nh_ofs; 281 nh_len = payload_ofs - nh_ofs;
@@ -358,6 +360,7 @@ static int parse_icmpv6(struct sk_buff *skb, struct sw_flow_key *key,
358 */ 360 */
359 key->tp.src = htons(icmp->icmp6_type); 361 key->tp.src = htons(icmp->icmp6_type);
360 key->tp.dst = htons(icmp->icmp6_code); 362 key->tp.dst = htons(icmp->icmp6_code);
363 memset(&key->ipv6.nd, 0, sizeof(key->ipv6.nd));
361 364
362 if (icmp->icmp6_code == 0 && 365 if (icmp->icmp6_code == 0 &&
363 (icmp->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION || 366 (icmp->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION ||
@@ -674,9 +677,6 @@ int ovs_flow_key_extract(struct ovs_tunnel_info *tun_info,
674 key->ovs_flow_hash = 0; 677 key->ovs_flow_hash = 0;
675 key->recirc_id = 0; 678 key->recirc_id = 0;
676 679
677 /* Flags are always used as part of stats */
678 key->tp.flags = 0;
679
680 return key_extract(skb, key); 680 return key_extract(skb, key);
681} 681}
682 682