diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_mirred.c | 3 | ||||
-rw-r--r-- | net/sched/cls_flower.c | 14 | ||||
-rw-r--r-- | net/sched/sch_netem.c | 9 |
3 files changed, 15 insertions, 11 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 1dae5f2b358f..c8cf4d10c435 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -258,7 +258,8 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a, | |||
258 | if (is_redirect) { | 258 | if (is_redirect) { |
259 | skb2->tc_redirected = 1; | 259 | skb2->tc_redirected = 1; |
260 | skb2->tc_from_ingress = skb2->tc_at_ingress; | 260 | skb2->tc_from_ingress = skb2->tc_at_ingress; |
261 | 261 | if (skb2->tc_from_ingress) | |
262 | skb2->tstamp = 0; | ||
262 | /* let's the caller reinsert the packet, if possible */ | 263 | /* let's the caller reinsert the packet, if possible */ |
263 | if (use_reinsert) { | 264 | if (use_reinsert) { |
264 | res->ingress = want_ingress; | 265 | res->ingress = want_ingress; |
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 9aada2d0ef06..c6c327874abc 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c | |||
@@ -709,11 +709,23 @@ static int fl_set_enc_opt(struct nlattr **tb, struct fl_flow_key *key, | |||
709 | struct netlink_ext_ack *extack) | 709 | struct netlink_ext_ack *extack) |
710 | { | 710 | { |
711 | const struct nlattr *nla_enc_key, *nla_opt_key, *nla_opt_msk = NULL; | 711 | const struct nlattr *nla_enc_key, *nla_opt_key, *nla_opt_msk = NULL; |
712 | int option_len, key_depth, msk_depth = 0; | 712 | int err, option_len, key_depth, msk_depth = 0; |
713 | |||
714 | err = nla_validate_nested(tb[TCA_FLOWER_KEY_ENC_OPTS], | ||
715 | TCA_FLOWER_KEY_ENC_OPTS_MAX, | ||
716 | enc_opts_policy, extack); | ||
717 | if (err) | ||
718 | return err; | ||
713 | 719 | ||
714 | nla_enc_key = nla_data(tb[TCA_FLOWER_KEY_ENC_OPTS]); | 720 | nla_enc_key = nla_data(tb[TCA_FLOWER_KEY_ENC_OPTS]); |
715 | 721 | ||
716 | if (tb[TCA_FLOWER_KEY_ENC_OPTS_MASK]) { | 722 | if (tb[TCA_FLOWER_KEY_ENC_OPTS_MASK]) { |
723 | err = nla_validate_nested(tb[TCA_FLOWER_KEY_ENC_OPTS_MASK], | ||
724 | TCA_FLOWER_KEY_ENC_OPTS_MAX, | ||
725 | enc_opts_policy, extack); | ||
726 | if (err) | ||
727 | return err; | ||
728 | |||
717 | nla_opt_msk = nla_data(tb[TCA_FLOWER_KEY_ENC_OPTS_MASK]); | 729 | nla_opt_msk = nla_data(tb[TCA_FLOWER_KEY_ENC_OPTS_MASK]); |
718 | msk_depth = nla_len(tb[TCA_FLOWER_KEY_ENC_OPTS_MASK]); | 730 | msk_depth = nla_len(tb[TCA_FLOWER_KEY_ENC_OPTS_MASK]); |
719 | } | 731 | } |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 57b3ad9394ad..2c38e3d07924 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -648,15 +648,6 @@ deliver: | |||
648 | */ | 648 | */ |
649 | skb->dev = qdisc_dev(sch); | 649 | skb->dev = qdisc_dev(sch); |
650 | 650 | ||
651 | #ifdef CONFIG_NET_CLS_ACT | ||
652 | /* | ||
653 | * If it's at ingress let's pretend the delay is | ||
654 | * from the network (tstamp will be updated). | ||
655 | */ | ||
656 | if (skb->tc_redirected && skb->tc_from_ingress) | ||
657 | skb->tstamp = 0; | ||
658 | #endif | ||
659 | |||
660 | if (q->slot.slot_next) { | 651 | if (q->slot.slot_next) { |
661 | q->slot.packets_left--; | 652 | q->slot.packets_left--; |
662 | q->slot.bytes_left -= qdisc_pkt_len(skb); | 653 | q->slot.bytes_left -= qdisc_pkt_len(skb); |