diff options
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r-- | net/sched/act_api.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 2dfb3e7a040d..64f5e328cee9 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -598,7 +598,7 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a, | |||
598 | goto errout; | 598 | goto errout; |
599 | 599 | ||
600 | /* compat_mode being true specifies a call that is supposed | 600 | /* compat_mode being true specifies a call that is supposed |
601 | * to add additional backward compatiblity statistic TLVs. | 601 | * to add additional backward compatibility statistic TLVs. |
602 | */ | 602 | */ |
603 | if (compat_mode) { | 603 | if (compat_mode) { |
604 | if (a->type == TCA_OLD_COMPAT) | 604 | if (a->type == TCA_OLD_COMPAT) |
@@ -618,7 +618,8 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a, | |||
618 | goto errout; | 618 | goto errout; |
619 | 619 | ||
620 | if (gnet_stats_copy_basic(&d, &h->tcf_bstats) < 0 || | 620 | if (gnet_stats_copy_basic(&d, &h->tcf_bstats) < 0 || |
621 | gnet_stats_copy_rate_est(&d, &h->tcf_rate_est) < 0 || | 621 | gnet_stats_copy_rate_est(&d, &h->tcf_bstats, |
622 | &h->tcf_rate_est) < 0 || | ||
622 | gnet_stats_copy_queue(&d, &h->tcf_qstats) < 0) | 623 | gnet_stats_copy_queue(&d, &h->tcf_qstats) < 0) |
623 | goto errout; | 624 | goto errout; |
624 | 625 | ||
@@ -968,7 +969,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
968 | u32 pid = skb ? NETLINK_CB(skb).pid : 0; | 969 | u32 pid = skb ? NETLINK_CB(skb).pid : 0; |
969 | int ret = 0, ovr = 0; | 970 | int ret = 0, ovr = 0; |
970 | 971 | ||
971 | if (net != &init_net) | 972 | if (!net_eq(net, &init_net)) |
972 | return -EINVAL; | 973 | return -EINVAL; |
973 | 974 | ||
974 | ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL); | 975 | ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL); |
@@ -1051,7 +1052,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb) | |||
1051 | struct tcamsg *t = (struct tcamsg *) NLMSG_DATA(cb->nlh); | 1052 | struct tcamsg *t = (struct tcamsg *) NLMSG_DATA(cb->nlh); |
1052 | struct nlattr *kind = find_dump_kind(cb->nlh); | 1053 | struct nlattr *kind = find_dump_kind(cb->nlh); |
1053 | 1054 | ||
1054 | if (net != &init_net) | 1055 | if (!net_eq(net, &init_net)) |
1055 | return 0; | 1056 | return 0; |
1056 | 1057 | ||
1057 | if (kind == NULL) { | 1058 | if (kind == NULL) { |