diff options
Diffstat (limited to 'net/openvswitch/flow_netlink.c')
-rw-r--r-- | net/openvswitch/flow_netlink.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index 3563acd5f92e..2427b672107a 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c | |||
@@ -856,7 +856,7 @@ static int vxlan_opt_to_nlattr(struct sk_buff *skb, | |||
856 | const struct vxlan_metadata *opts = tun_opts; | 856 | const struct vxlan_metadata *opts = tun_opts; |
857 | struct nlattr *nla; | 857 | struct nlattr *nla; |
858 | 858 | ||
859 | nla = nla_nest_start(skb, OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS); | 859 | nla = nla_nest_start_noflag(skb, OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS); |
860 | if (!nla) | 860 | if (!nla) |
861 | return -EMSGSIZE; | 861 | return -EMSGSIZE; |
862 | 862 | ||
@@ -948,7 +948,7 @@ static int ip_tun_to_nlattr(struct sk_buff *skb, | |||
948 | struct nlattr *nla; | 948 | struct nlattr *nla; |
949 | int err; | 949 | int err; |
950 | 950 | ||
951 | nla = nla_nest_start(skb, OVS_KEY_ATTR_TUNNEL); | 951 | nla = nla_nest_start_noflag(skb, OVS_KEY_ATTR_TUNNEL); |
952 | if (!nla) | 952 | if (!nla) |
953 | return -EMSGSIZE; | 953 | return -EMSGSIZE; |
954 | 954 | ||
@@ -1957,7 +1957,7 @@ static int nsh_key_to_nlattr(const struct ovs_key_nsh *nsh, bool is_mask, | |||
1957 | { | 1957 | { |
1958 | struct nlattr *start; | 1958 | struct nlattr *start; |
1959 | 1959 | ||
1960 | start = nla_nest_start(skb, OVS_KEY_ATTR_NSH); | 1960 | start = nla_nest_start_noflag(skb, OVS_KEY_ATTR_NSH); |
1961 | if (!start) | 1961 | if (!start) |
1962 | return -EMSGSIZE; | 1962 | return -EMSGSIZE; |
1963 | 1963 | ||
@@ -2040,14 +2040,15 @@ static int __ovs_nla_put_key(const struct sw_flow_key *swkey, | |||
2040 | if (swkey->eth.vlan.tci || eth_type_vlan(swkey->eth.type)) { | 2040 | if (swkey->eth.vlan.tci || eth_type_vlan(swkey->eth.type)) { |
2041 | if (ovs_nla_put_vlan(skb, &output->eth.vlan, is_mask)) | 2041 | if (ovs_nla_put_vlan(skb, &output->eth.vlan, is_mask)) |
2042 | goto nla_put_failure; | 2042 | goto nla_put_failure; |
2043 | encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP); | 2043 | encap = nla_nest_start_noflag(skb, OVS_KEY_ATTR_ENCAP); |
2044 | if (!swkey->eth.vlan.tci) | 2044 | if (!swkey->eth.vlan.tci) |
2045 | goto unencap; | 2045 | goto unencap; |
2046 | 2046 | ||
2047 | if (swkey->eth.cvlan.tci || eth_type_vlan(swkey->eth.type)) { | 2047 | if (swkey->eth.cvlan.tci || eth_type_vlan(swkey->eth.type)) { |
2048 | if (ovs_nla_put_vlan(skb, &output->eth.cvlan, is_mask)) | 2048 | if (ovs_nla_put_vlan(skb, &output->eth.cvlan, is_mask)) |
2049 | goto nla_put_failure; | 2049 | goto nla_put_failure; |
2050 | in_encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP); | 2050 | in_encap = nla_nest_start_noflag(skb, |
2051 | OVS_KEY_ATTR_ENCAP); | ||
2051 | if (!swkey->eth.cvlan.tci) | 2052 | if (!swkey->eth.cvlan.tci) |
2052 | goto unencap; | 2053 | goto unencap; |
2053 | } | 2054 | } |
@@ -2226,7 +2227,7 @@ int ovs_nla_put_key(const struct sw_flow_key *swkey, | |||
2226 | int err; | 2227 | int err; |
2227 | struct nlattr *nla; | 2228 | struct nlattr *nla; |
2228 | 2229 | ||
2229 | nla = nla_nest_start(skb, attr); | 2230 | nla = nla_nest_start_noflag(skb, attr); |
2230 | if (!nla) | 2231 | if (!nla) |
2231 | return -EMSGSIZE; | 2232 | return -EMSGSIZE; |
2232 | err = __ovs_nla_put_key(swkey, output, is_mask, skb); | 2233 | err = __ovs_nla_put_key(swkey, output, is_mask, skb); |
@@ -3252,7 +3253,7 @@ static int sample_action_to_attr(const struct nlattr *attr, | |||
3252 | const struct sample_arg *arg; | 3253 | const struct sample_arg *arg; |
3253 | struct nlattr *actions; | 3254 | struct nlattr *actions; |
3254 | 3255 | ||
3255 | start = nla_nest_start(skb, OVS_ACTION_ATTR_SAMPLE); | 3256 | start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_SAMPLE); |
3256 | if (!start) | 3257 | if (!start) |
3257 | return -EMSGSIZE; | 3258 | return -EMSGSIZE; |
3258 | 3259 | ||
@@ -3265,7 +3266,7 @@ static int sample_action_to_attr(const struct nlattr *attr, | |||
3265 | goto out; | 3266 | goto out; |
3266 | } | 3267 | } |
3267 | 3268 | ||
3268 | ac_start = nla_nest_start(skb, OVS_SAMPLE_ATTR_ACTIONS); | 3269 | ac_start = nla_nest_start_noflag(skb, OVS_SAMPLE_ATTR_ACTIONS); |
3269 | if (!ac_start) { | 3270 | if (!ac_start) { |
3270 | err = -EMSGSIZE; | 3271 | err = -EMSGSIZE; |
3271 | goto out; | 3272 | goto out; |
@@ -3291,7 +3292,7 @@ static int clone_action_to_attr(const struct nlattr *attr, | |||
3291 | struct nlattr *start; | 3292 | struct nlattr *start; |
3292 | int err = 0, rem = nla_len(attr); | 3293 | int err = 0, rem = nla_len(attr); |
3293 | 3294 | ||
3294 | start = nla_nest_start(skb, OVS_ACTION_ATTR_CLONE); | 3295 | start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_CLONE); |
3295 | if (!start) | 3296 | if (!start) |
3296 | return -EMSGSIZE; | 3297 | return -EMSGSIZE; |
3297 | 3298 | ||
@@ -3313,7 +3314,7 @@ static int check_pkt_len_action_to_attr(const struct nlattr *attr, | |||
3313 | const struct nlattr *a, *cpl_arg; | 3314 | const struct nlattr *a, *cpl_arg; |
3314 | int err = 0, rem = nla_len(attr); | 3315 | int err = 0, rem = nla_len(attr); |
3315 | 3316 | ||
3316 | start = nla_nest_start(skb, OVS_ACTION_ATTR_CHECK_PKT_LEN); | 3317 | start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_CHECK_PKT_LEN); |
3317 | if (!start) | 3318 | if (!start) |
3318 | return -EMSGSIZE; | 3319 | return -EMSGSIZE; |
3319 | 3320 | ||
@@ -3332,8 +3333,8 @@ static int check_pkt_len_action_to_attr(const struct nlattr *attr, | |||
3332 | * 'OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL'. | 3333 | * 'OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL'. |
3333 | */ | 3334 | */ |
3334 | a = nla_next(cpl_arg, &rem); | 3335 | a = nla_next(cpl_arg, &rem); |
3335 | ac_start = nla_nest_start(skb, | 3336 | ac_start = nla_nest_start_noflag(skb, |
3336 | OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL); | 3337 | OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL); |
3337 | if (!ac_start) { | 3338 | if (!ac_start) { |
3338 | err = -EMSGSIZE; | 3339 | err = -EMSGSIZE; |
3339 | goto out; | 3340 | goto out; |
@@ -3351,8 +3352,8 @@ static int check_pkt_len_action_to_attr(const struct nlattr *attr, | |||
3351 | * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER. | 3352 | * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER. |
3352 | */ | 3353 | */ |
3353 | a = nla_next(a, &rem); | 3354 | a = nla_next(a, &rem); |
3354 | ac_start = nla_nest_start(skb, | 3355 | ac_start = nla_nest_start_noflag(skb, |
3355 | OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER); | 3356 | OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER); |
3356 | if (!ac_start) { | 3357 | if (!ac_start) { |
3357 | err = -EMSGSIZE; | 3358 | err = -EMSGSIZE; |
3358 | goto out; | 3359 | goto out; |
@@ -3386,7 +3387,7 @@ static int set_action_to_attr(const struct nlattr *a, struct sk_buff *skb) | |||
3386 | struct ovs_tunnel_info *ovs_tun = nla_data(ovs_key); | 3387 | struct ovs_tunnel_info *ovs_tun = nla_data(ovs_key); |
3387 | struct ip_tunnel_info *tun_info = &ovs_tun->tun_dst->u.tun_info; | 3388 | struct ip_tunnel_info *tun_info = &ovs_tun->tun_dst->u.tun_info; |
3388 | 3389 | ||
3389 | start = nla_nest_start(skb, OVS_ACTION_ATTR_SET); | 3390 | start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_SET); |
3390 | if (!start) | 3391 | if (!start) |
3391 | return -EMSGSIZE; | 3392 | return -EMSGSIZE; |
3392 | 3393 | ||
@@ -3418,7 +3419,7 @@ static int masked_set_action_to_set_action_attr(const struct nlattr *a, | |||
3418 | /* Revert the conversion we did from a non-masked set action to | 3419 | /* Revert the conversion we did from a non-masked set action to |
3419 | * masked set action. | 3420 | * masked set action. |
3420 | */ | 3421 | */ |
3421 | nla = nla_nest_start(skb, OVS_ACTION_ATTR_SET); | 3422 | nla = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_SET); |
3422 | if (!nla) | 3423 | if (!nla) |
3423 | return -EMSGSIZE; | 3424 | return -EMSGSIZE; |
3424 | 3425 | ||