diff options
Diffstat (limited to 'net/sched/act_ipt.c')
-rw-r--r-- | net/sched/act_ipt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 47f0b1324239..00b05f422d45 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/proc_fs.h> | 31 | #include <linux/proc_fs.h> |
32 | #include <linux/kmod.h> | 32 | #include <linux/kmod.h> |
33 | #include <net/netlink.h> | ||
33 | #include <net/sock.h> | 34 | #include <net/sock.h> |
34 | #include <net/pkt_sched.h> | 35 | #include <net/pkt_sched.h> |
35 | #include <linux/tc_act/tc_ipt.h> | 36 | #include <linux/tc_act/tc_ipt.h> |
@@ -245,7 +246,7 @@ static int tcf_ipt(struct sk_buff *skb, struct tc_action *a, | |||
245 | 246 | ||
246 | static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) | 247 | static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) |
247 | { | 248 | { |
248 | unsigned char *b = skb->tail; | 249 | unsigned char *b = skb_tail_pointer(skb); |
249 | struct tcf_ipt *ipt = a->priv; | 250 | struct tcf_ipt *ipt = a->priv; |
250 | struct ipt_entry_target *t; | 251 | struct ipt_entry_target *t; |
251 | struct tcf_t tm; | 252 | struct tcf_t tm; |
@@ -277,7 +278,7 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int | |||
277 | return skb->len; | 278 | return skb->len; |
278 | 279 | ||
279 | rtattr_failure: | 280 | rtattr_failure: |
280 | skb_trim(skb, b - skb->data); | 281 | nlmsg_trim(skb, b); |
281 | kfree(t); | 282 | kfree(t); |
282 | return -1; | 283 | return -1; |
283 | } | 284 | } |