diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_api.c | 4 | ||||
-rw-r--r-- | net/sched/act_simple.c | 2 | ||||
-rw-r--r-- | net/sched/cls_api.c | 4 | ||||
-rw-r--r-- | net/sched/em_meta.c | 4 | ||||
-rw-r--r-- | net/sched/sch_api.c | 10 |
5 files changed, 12 insertions, 12 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 0b8eb235bc13..74e662cbb2c5 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -951,7 +951,7 @@ done: | |||
951 | 951 | ||
952 | static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | 952 | static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg) |
953 | { | 953 | { |
954 | struct net *net = skb->sk->sk_net; | 954 | struct net *net = sock_net(skb->sk); |
955 | struct nlattr *tca[TCA_ACT_MAX + 1]; | 955 | struct nlattr *tca[TCA_ACT_MAX + 1]; |
956 | u32 pid = skb ? NETLINK_CB(skb).pid : 0; | 956 | u32 pid = skb ? NETLINK_CB(skb).pid : 0; |
957 | int ret = 0, ovr = 0; | 957 | int ret = 0, ovr = 0; |
@@ -1029,7 +1029,7 @@ find_dump_kind(struct nlmsghdr *n) | |||
1029 | static int | 1029 | static int |
1030 | tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb) | 1030 | tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb) |
1031 | { | 1031 | { |
1032 | struct net *net = skb->sk->sk_net; | 1032 | struct net *net = sock_net(skb->sk); |
1033 | struct nlmsghdr *nlh; | 1033 | struct nlmsghdr *nlh; |
1034 | unsigned char *b = skb_tail_pointer(skb); | 1034 | unsigned char *b = skb_tail_pointer(skb); |
1035 | struct nlattr *nest; | 1035 | struct nlattr *nest; |
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index fbde461b716c..64b2d136c78e 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c | |||
@@ -115,7 +115,7 @@ static int tcf_simp_init(struct nlattr *nla, struct nlattr *est, | |||
115 | return -EINVAL; | 115 | return -EINVAL; |
116 | 116 | ||
117 | datalen = nla_len(tb[TCA_DEF_DATA]); | 117 | datalen = nla_len(tb[TCA_DEF_DATA]); |
118 | if (datalen <= 0) | 118 | if (datalen == 0) |
119 | return -EINVAL; | 119 | return -EINVAL; |
120 | 120 | ||
121 | pc = tcf_hash_check(parm->index, a, bind, &simp_hash_info); | 121 | pc = tcf_hash_check(parm->index, a, bind, &simp_hash_info); |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0fbedcabf111..1086df7478bc 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -118,7 +118,7 @@ static inline u32 tcf_auto_prio(struct tcf_proto *tp) | |||
118 | 118 | ||
119 | static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | 119 | static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) |
120 | { | 120 | { |
121 | struct net *net = skb->sk->sk_net; | 121 | struct net *net = sock_net(skb->sk); |
122 | struct nlattr *tca[TCA_MAX + 1]; | 122 | struct nlattr *tca[TCA_MAX + 1]; |
123 | struct tcmsg *t; | 123 | struct tcmsg *t; |
124 | u32 protocol; | 124 | u32 protocol; |
@@ -389,7 +389,7 @@ static int tcf_node_dump(struct tcf_proto *tp, unsigned long n, | |||
389 | 389 | ||
390 | static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) | 390 | static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) |
391 | { | 391 | { |
392 | struct net *net = skb->sk->sk_net; | 392 | struct net *net = sock_net(skb->sk); |
393 | int t; | 393 | int t; |
394 | int s_t; | 394 | int s_t; |
395 | struct net_device *dev; | 395 | struct net_device *dev; |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 3da4129b89d1..72cf86e3c090 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -256,10 +256,10 @@ META_COLLECTOR(int_rtclassid) | |||
256 | 256 | ||
257 | META_COLLECTOR(int_rtiif) | 257 | META_COLLECTOR(int_rtiif) |
258 | { | 258 | { |
259 | if (unlikely(skb->dst == NULL)) | 259 | if (unlikely(skb->rtable == NULL)) |
260 | *err = -1; | 260 | *err = -1; |
261 | else | 261 | else |
262 | dst->value = ((struct rtable*) skb->dst)->fl.iif; | 262 | dst->value = skb->rtable->fl.iif; |
263 | } | 263 | } |
264 | 264 | ||
265 | /************************************************************************** | 265 | /************************************************************************** |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index fc8708a0a25e..c40773cdbe45 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -608,7 +608,7 @@ check_loop_fn(struct Qdisc *q, unsigned long cl, struct qdisc_walker *w) | |||
608 | 608 | ||
609 | static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | 609 | static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) |
610 | { | 610 | { |
611 | struct net *net = skb->sk->sk_net; | 611 | struct net *net = sock_net(skb->sk); |
612 | struct tcmsg *tcm = NLMSG_DATA(n); | 612 | struct tcmsg *tcm = NLMSG_DATA(n); |
613 | struct nlattr *tca[TCA_MAX + 1]; | 613 | struct nlattr *tca[TCA_MAX + 1]; |
614 | struct net_device *dev; | 614 | struct net_device *dev; |
@@ -677,7 +677,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
677 | 677 | ||
678 | static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | 678 | static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) |
679 | { | 679 | { |
680 | struct net *net = skb->sk->sk_net; | 680 | struct net *net = sock_net(skb->sk); |
681 | struct tcmsg *tcm; | 681 | struct tcmsg *tcm; |
682 | struct nlattr *tca[TCA_MAX + 1]; | 682 | struct nlattr *tca[TCA_MAX + 1]; |
683 | struct net_device *dev; | 683 | struct net_device *dev; |
@@ -896,7 +896,7 @@ err_out: | |||
896 | 896 | ||
897 | static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) | 897 | static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) |
898 | { | 898 | { |
899 | struct net *net = skb->sk->sk_net; | 899 | struct net *net = sock_net(skb->sk); |
900 | int idx, q_idx; | 900 | int idx, q_idx; |
901 | int s_idx, s_q_idx; | 901 | int s_idx, s_q_idx; |
902 | struct net_device *dev; | 902 | struct net_device *dev; |
@@ -948,7 +948,7 @@ done: | |||
948 | 948 | ||
949 | static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | 949 | static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg) |
950 | { | 950 | { |
951 | struct net *net = skb->sk->sk_net; | 951 | struct net *net = sock_net(skb->sk); |
952 | struct tcmsg *tcm = NLMSG_DATA(n); | 952 | struct tcmsg *tcm = NLMSG_DATA(n); |
953 | struct nlattr *tca[TCA_MAX + 1]; | 953 | struct nlattr *tca[TCA_MAX + 1]; |
954 | struct net_device *dev; | 954 | struct net_device *dev; |
@@ -1142,7 +1142,7 @@ static int qdisc_class_dump(struct Qdisc *q, unsigned long cl, struct qdisc_walk | |||
1142 | 1142 | ||
1143 | static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) | 1143 | static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) |
1144 | { | 1144 | { |
1145 | struct net *net = skb->sk->sk_net; | 1145 | struct net *net = sock_net(skb->sk); |
1146 | int t; | 1146 | int t; |
1147 | int s_t; | 1147 | int s_t; |
1148 | struct net_device *dev; | 1148 | struct net_device *dev; |