aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_fw.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/cls_fw.c')
-rw-r--r--net/sched/cls_fw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 5dbb9d451f73..bbec4a0d4dcb 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -38,6 +38,7 @@
38#include <linux/notifier.h> 38#include <linux/notifier.h>
39#include <linux/netfilter.h> 39#include <linux/netfilter.h>
40#include <net/ip.h> 40#include <net/ip.h>
41#include <net/netlink.h>
41#include <net/route.h> 42#include <net/route.h>
42#include <linux/skbuff.h> 43#include <linux/skbuff.h>
43#include <net/sock.h> 44#include <net/sock.h>
@@ -348,7 +349,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
348{ 349{
349 struct fw_head *head = (struct fw_head *)tp->root; 350 struct fw_head *head = (struct fw_head *)tp->root;
350 struct fw_filter *f = (struct fw_filter*)fh; 351 struct fw_filter *f = (struct fw_filter*)fh;
351 unsigned char *b = skb->tail; 352 unsigned char *b = skb_tail_pointer(skb);
352 struct rtattr *rta; 353 struct rtattr *rta;
353 354
354 if (f == NULL) 355 if (f == NULL)
@@ -374,7 +375,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
374 if (tcf_exts_dump(skb, &f->exts, &fw_ext_map) < 0) 375 if (tcf_exts_dump(skb, &f->exts, &fw_ext_map) < 0)
375 goto rtattr_failure; 376 goto rtattr_failure;
376 377
377 rta->rta_len = skb->tail - b; 378 rta->rta_len = skb_tail_pointer(skb) - b;
378 379
379 if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) 380 if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0)
380 goto rtattr_failure; 381 goto rtattr_failure;
@@ -382,7 +383,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
382 return skb->len; 383 return skb->len;
383 384
384rtattr_failure: 385rtattr_failure:
385 skb_trim(skb, b - skb->data); 386 nlmsg_trim(skb, b);
386 return -1; 387 return -1;
387} 388}
388 389