aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/flow_netlink.c')
-rw-r--r--net/openvswitch/flow_netlink.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 989f38f120bb..6f5fa50f716d 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -1072,14 +1072,14 @@ static int metadata_from_nlattrs(struct net *net, struct sw_flow_match *match,
1072 return -EINVAL; 1072 return -EINVAL;
1073 } 1073 }
1074 1074
1075 SW_FLOW_KEY_PUT(match, ct.state, ct_state, is_mask); 1075 SW_FLOW_KEY_PUT(match, ct_state, ct_state, is_mask);
1076 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_STATE); 1076 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_STATE);
1077 } 1077 }
1078 if (*attrs & (1 << OVS_KEY_ATTR_CT_ZONE) && 1078 if (*attrs & (1 << OVS_KEY_ATTR_CT_ZONE) &&
1079 ovs_ct_verify(net, OVS_KEY_ATTR_CT_ZONE)) { 1079 ovs_ct_verify(net, OVS_KEY_ATTR_CT_ZONE)) {
1080 u16 ct_zone = nla_get_u16(a[OVS_KEY_ATTR_CT_ZONE]); 1080 u16 ct_zone = nla_get_u16(a[OVS_KEY_ATTR_CT_ZONE]);
1081 1081
1082 SW_FLOW_KEY_PUT(match, ct.zone, ct_zone, is_mask); 1082 SW_FLOW_KEY_PUT(match, ct_zone, ct_zone, is_mask);
1083 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_ZONE); 1083 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_ZONE);
1084 } 1084 }
1085 if (*attrs & (1 << OVS_KEY_ATTR_CT_MARK) && 1085 if (*attrs & (1 << OVS_KEY_ATTR_CT_MARK) &&
@@ -1107,7 +1107,7 @@ static int metadata_from_nlattrs(struct net *net, struct sw_flow_match *match,
1107 SW_FLOW_KEY_PUT(match, ipv4.ct_orig.dst, ct->ipv4_dst, is_mask); 1107 SW_FLOW_KEY_PUT(match, ipv4.ct_orig.dst, ct->ipv4_dst, is_mask);
1108 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask); 1108 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask);
1109 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask); 1109 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask);
1110 SW_FLOW_KEY_PUT(match, ct.orig_proto, ct->ipv4_proto, is_mask); 1110 SW_FLOW_KEY_PUT(match, ct_orig_proto, ct->ipv4_proto, is_mask);
1111 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4); 1111 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4);
1112 } 1112 }
1113 if (*attrs & (1ULL << OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6)) { 1113 if (*attrs & (1ULL << OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6)) {
@@ -1123,7 +1123,7 @@ static int metadata_from_nlattrs(struct net *net, struct sw_flow_match *match,
1123 is_mask); 1123 is_mask);
1124 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask); 1124 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask);
1125 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask); 1125 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask);
1126 SW_FLOW_KEY_PUT(match, ct.orig_proto, ct->ipv6_proto, is_mask); 1126 SW_FLOW_KEY_PUT(match, ct_orig_proto, ct->ipv6_proto, is_mask);
1127 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6); 1127 *attrs &= ~(1ULL << OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6);
1128 } 1128 }
1129 1129
@@ -1564,6 +1564,9 @@ int ovs_nla_get_flow_metadata(struct net *net,
1564 memset(&match, 0, sizeof(match)); 1564 memset(&match, 0, sizeof(match));
1565 match.key = key; 1565 match.key = key;
1566 1566
1567 key->ct_state = 0;
1568 key->ct_zone = 0;
1569 key->ct_orig_proto = 0;
1567 memset(&key->ct, 0, sizeof(key->ct)); 1570 memset(&key->ct, 0, sizeof(key->ct));
1568 memset(&key->ipv4.ct_orig, 0, sizeof(key->ipv4.ct_orig)); 1571 memset(&key->ipv4.ct_orig, 0, sizeof(key->ipv4.ct_orig));
1569 memset(&key->ipv6.ct_orig, 0, sizeof(key->ipv6.ct_orig)); 1572 memset(&key->ipv6.ct_orig, 0, sizeof(key->ipv6.ct_orig));