diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-03 08:05:59 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-03 08:05:59 -0300 |
commit | 9434628fcee63b1f3c6a6881b70e8f69a1f68e88 (patch) | |
tree | 255d093aeda6c125f0158e883eb2bf400bb7f737 /net/openvswitch/actions.c | |
parent | c42ad5d4358230be166fc36c87bae0dd1680c570 (diff) | |
parent | cdd3bb54332f82295ed90cd0c09c78cd0c0ee822 (diff) | |
download | linux-9434628fcee63b1f3c6a6881b70e8f69a1f68e88.tar.bz2 |
Merge remote-tracking branch 'torvalds/master' into perf/urgent
To synchronize UAPI headers.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'net/openvswitch/actions.c')
-rw-r--r-- | net/openvswitch/actions.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index fc0efd8833c8..2611657f40ca 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -1169,9 +1169,10 @@ static int execute_check_pkt_len(struct datapath *dp, struct sk_buff *skb, struct sw_flow_key *key, const struct nlattr *attr, bool last) { + struct ovs_skb_cb *ovs_cb = OVS_CB(skb); const struct nlattr *actions, *cpl_arg; + int len, max_len, rem = nla_len(attr); const struct check_pkt_len_arg *arg; - int rem = nla_len(attr); bool clone_flow_key; /* The first netlink attribute in 'attr' is always @@ -1180,7 +1181,11 @@ static int execute_check_pkt_len(struct datapath *dp, struct sk_buff *skb, cpl_arg = nla_data(attr); arg = nla_data(cpl_arg); - if (skb->len <= arg->pkt_len) { + len = ovs_cb->mru ? ovs_cb->mru + skb->mac_len : skb->len; + max_len = arg->pkt_len; + + if ((skb_is_gso(skb) && skb_gso_validate_mac_len(skb, max_len)) || + len <= max_len) { /* Second netlink attribute in 'attr' is always * 'OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL'. */ |