Loading net/sched/act_api.c +6 −3 Original line number Diff line number Diff line Loading @@ -127,7 +127,8 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a, nest = nla_nest_start(skb, a->order); if (nest == NULL) goto nla_put_failure; NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); if (nla_put_string(skb, TCA_KIND, a->ops->kind)) goto nla_put_failure; for (i = 0; i < (hinfo->hmask + 1); i++) { p = hinfo->htab[tcf_hash(i, hinfo->hmask)]; Loading @@ -139,7 +140,8 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a, p = s_p; } } NLA_PUT_U32(skb, TCA_FCNT, n_i); if (nla_put_u32(skb, TCA_FCNT, n_i)) goto nla_put_failure; nla_nest_end(skb, nest); return n_i; Loading Loading @@ -437,7 +439,8 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref) if (a->ops == NULL || a->ops->dump == NULL) return err; NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); if (nla_put_string(skb, TCA_KIND, a->ops->kind)) goto nla_put_failure; if (tcf_action_copy_stats(skb, a, 0)) goto nla_put_failure; nest = nla_nest_start(skb, TCA_OPTIONS); Loading net/sched/act_csum.c +4 −2 Original line number Diff line number Diff line Loading @@ -550,11 +550,13 @@ static int tcf_csum_dump(struct sk_buff *skb, }; struct tcf_t t; NLA_PUT(skb, TCA_CSUM_PARMS, sizeof(opt), &opt); if (nla_put(skb, TCA_CSUM_PARMS, sizeof(opt), &opt)) goto nla_put_failure; t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install); t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); t.expires = jiffies_to_clock_t(p->tcf_tm.expires); NLA_PUT(skb, TCA_CSUM_TM, sizeof(t), &t); if (nla_put(skb, TCA_CSUM_TM, sizeof(t), &t)) goto nla_put_failure; return skb->len; Loading net/sched/act_gact.c +6 −3 Original line number Diff line number Diff line Loading @@ -162,7 +162,8 @@ static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int }; struct tcf_t t; NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt); if (nla_put(skb, TCA_GACT_PARMS, sizeof(opt), &opt)) goto nla_put_failure; #ifdef CONFIG_GACT_PROB if (gact->tcfg_ptype) { struct tc_gact_p p_opt = { Loading @@ -171,13 +172,15 @@ static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int .ptype = gact->tcfg_ptype, }; NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt); if (nla_put(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt)) goto nla_put_failure; } #endif t.install = jiffies_to_clock_t(jiffies - gact->tcf_tm.install); t.lastuse = jiffies_to_clock_t(jiffies - gact->tcf_tm.lastuse); t.expires = jiffies_to_clock_t(gact->tcf_tm.expires); NLA_PUT(skb, TCA_GACT_TM, sizeof(t), &t); if (nla_put(skb, TCA_GACT_TM, sizeof(t), &t)) goto nla_put_failure; return skb->len; nla_put_failure: Loading net/sched/act_ipt.c +8 −6 Original line number Diff line number Diff line Loading @@ -267,15 +267,17 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int c.refcnt = ipt->tcf_refcnt - ref; strcpy(t->u.user.name, ipt->tcfi_t->u.kernel.target->name); NLA_PUT(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t); NLA_PUT_U32(skb, TCA_IPT_INDEX, ipt->tcf_index); NLA_PUT_U32(skb, TCA_IPT_HOOK, ipt->tcfi_hook); NLA_PUT(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c); NLA_PUT_STRING(skb, TCA_IPT_TABLE, ipt->tcfi_tname); if (nla_put(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t) || nla_put_u32(skb, TCA_IPT_INDEX, ipt->tcf_index) || nla_put_u32(skb, TCA_IPT_HOOK, ipt->tcfi_hook) || nla_put(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c) || nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname)) goto nla_put_failure; tm.install = jiffies_to_clock_t(jiffies - ipt->tcf_tm.install); tm.lastuse = jiffies_to_clock_t(jiffies - ipt->tcf_tm.lastuse); tm.expires = jiffies_to_clock_t(ipt->tcf_tm.expires); NLA_PUT(skb, TCA_IPT_TM, sizeof (tm), &tm); if (nla_put(skb, TCA_IPT_TM, sizeof (tm), &tm)) goto nla_put_failure; kfree(t); return skb->len; Loading net/sched/act_mirred.c +4 −2 Original line number Diff line number Diff line Loading @@ -227,11 +227,13 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i }; struct tcf_t t; NLA_PUT(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt); if (nla_put(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt)) goto nla_put_failure; t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install); t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse); t.expires = jiffies_to_clock_t(m->tcf_tm.expires); NLA_PUT(skb, TCA_MIRRED_TM, sizeof(t), &t); if (nla_put(skb, TCA_MIRRED_TM, sizeof(t), &t)) goto nla_put_failure; return skb->len; nla_put_failure: Loading Loading
net/sched/act_api.c +6 −3 Original line number Diff line number Diff line Loading @@ -127,7 +127,8 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a, nest = nla_nest_start(skb, a->order); if (nest == NULL) goto nla_put_failure; NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); if (nla_put_string(skb, TCA_KIND, a->ops->kind)) goto nla_put_failure; for (i = 0; i < (hinfo->hmask + 1); i++) { p = hinfo->htab[tcf_hash(i, hinfo->hmask)]; Loading @@ -139,7 +140,8 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a, p = s_p; } } NLA_PUT_U32(skb, TCA_FCNT, n_i); if (nla_put_u32(skb, TCA_FCNT, n_i)) goto nla_put_failure; nla_nest_end(skb, nest); return n_i; Loading Loading @@ -437,7 +439,8 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref) if (a->ops == NULL || a->ops->dump == NULL) return err; NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); if (nla_put_string(skb, TCA_KIND, a->ops->kind)) goto nla_put_failure; if (tcf_action_copy_stats(skb, a, 0)) goto nla_put_failure; nest = nla_nest_start(skb, TCA_OPTIONS); Loading
net/sched/act_csum.c +4 −2 Original line number Diff line number Diff line Loading @@ -550,11 +550,13 @@ static int tcf_csum_dump(struct sk_buff *skb, }; struct tcf_t t; NLA_PUT(skb, TCA_CSUM_PARMS, sizeof(opt), &opt); if (nla_put(skb, TCA_CSUM_PARMS, sizeof(opt), &opt)) goto nla_put_failure; t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install); t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); t.expires = jiffies_to_clock_t(p->tcf_tm.expires); NLA_PUT(skb, TCA_CSUM_TM, sizeof(t), &t); if (nla_put(skb, TCA_CSUM_TM, sizeof(t), &t)) goto nla_put_failure; return skb->len; Loading
net/sched/act_gact.c +6 −3 Original line number Diff line number Diff line Loading @@ -162,7 +162,8 @@ static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int }; struct tcf_t t; NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt); if (nla_put(skb, TCA_GACT_PARMS, sizeof(opt), &opt)) goto nla_put_failure; #ifdef CONFIG_GACT_PROB if (gact->tcfg_ptype) { struct tc_gact_p p_opt = { Loading @@ -171,13 +172,15 @@ static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int .ptype = gact->tcfg_ptype, }; NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt); if (nla_put(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt)) goto nla_put_failure; } #endif t.install = jiffies_to_clock_t(jiffies - gact->tcf_tm.install); t.lastuse = jiffies_to_clock_t(jiffies - gact->tcf_tm.lastuse); t.expires = jiffies_to_clock_t(gact->tcf_tm.expires); NLA_PUT(skb, TCA_GACT_TM, sizeof(t), &t); if (nla_put(skb, TCA_GACT_TM, sizeof(t), &t)) goto nla_put_failure; return skb->len; nla_put_failure: Loading
net/sched/act_ipt.c +8 −6 Original line number Diff line number Diff line Loading @@ -267,15 +267,17 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int c.refcnt = ipt->tcf_refcnt - ref; strcpy(t->u.user.name, ipt->tcfi_t->u.kernel.target->name); NLA_PUT(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t); NLA_PUT_U32(skb, TCA_IPT_INDEX, ipt->tcf_index); NLA_PUT_U32(skb, TCA_IPT_HOOK, ipt->tcfi_hook); NLA_PUT(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c); NLA_PUT_STRING(skb, TCA_IPT_TABLE, ipt->tcfi_tname); if (nla_put(skb, TCA_IPT_TARG, ipt->tcfi_t->u.user.target_size, t) || nla_put_u32(skb, TCA_IPT_INDEX, ipt->tcf_index) || nla_put_u32(skb, TCA_IPT_HOOK, ipt->tcfi_hook) || nla_put(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c) || nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname)) goto nla_put_failure; tm.install = jiffies_to_clock_t(jiffies - ipt->tcf_tm.install); tm.lastuse = jiffies_to_clock_t(jiffies - ipt->tcf_tm.lastuse); tm.expires = jiffies_to_clock_t(ipt->tcf_tm.expires); NLA_PUT(skb, TCA_IPT_TM, sizeof (tm), &tm); if (nla_put(skb, TCA_IPT_TM, sizeof (tm), &tm)) goto nla_put_failure; kfree(t); return skb->len; Loading
net/sched/act_mirred.c +4 −2 Original line number Diff line number Diff line Loading @@ -227,11 +227,13 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i }; struct tcf_t t; NLA_PUT(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt); if (nla_put(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt)) goto nla_put_failure; t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install); t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse); t.expires = jiffies_to_clock_t(m->tcf_tm.expires); NLA_PUT(skb, TCA_MIRRED_TM, sizeof(t), &t); if (nla_put(skb, TCA_MIRRED_TM, sizeof(t), &t)) goto nla_put_failure; return skb->len; nla_put_failure: Loading