]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/cls_tcindex.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-2.6-omap-h63xx.git] / net / sched / cls_tcindex.c
index 7563fdcef4b764e104636baef055bdf6542d356e..2314820a080a3d7e94b4e523c1dc242ce1c493b7 100644 (file)
@@ -9,11 +9,9 @@
 #include <linux/kernel.h>
 #include <linux/skbuff.h>
 #include <linux/errno.h>
-#include <linux/netdevice.h>
-#include <net/ip.h>
 #include <net/act_api.h>
+#include <net/netlink.h>
 #include <net/pkt_cls.h>
-#include <net/route.h>
 
 
 /*
@@ -448,7 +446,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh,
 {
        struct tcindex_data *p = PRIV(tp);
        struct tcindex_filter_result *r = (struct tcindex_filter_result *) fh;
-       unsigned char *b = skb->tail;
+       unsigned char *b = skb_tail_pointer(skb);
        struct rtattr *rta;
 
        DPRINTK("tcindex_dump(tp %p,fh 0x%lx,skb %p,t %p),p %p,r %p,b %p\n",
@@ -463,7 +461,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh,
                RTA_PUT(skb,TCA_TCINDEX_SHIFT,sizeof(p->shift),&p->shift);
                RTA_PUT(skb,TCA_TCINDEX_FALL_THROUGH,sizeof(p->fall_through),
                    &p->fall_through);
-               rta->rta_len = skb->tail-b;
+               rta->rta_len = skb_tail_pointer(skb) - b;
        } else {
                if (p->perfect) {
                        t->tcm_handle = r-p->perfect;
@@ -486,7 +484,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh,
 
                if (tcf_exts_dump(skb, &r->exts, &tcindex_ext_map) < 0)
                        goto rtattr_failure;
-               rta->rta_len = skb->tail-b;
+               rta->rta_len = skb_tail_pointer(skb) - b;
 
                if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0)
                        goto rtattr_failure;
@@ -495,7 +493,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh,
        return skb->len;
 
 rtattr_failure:
-       skb_trim(skb, b - skb->data);
+       nlmsg_trim(skb, b);
        return -1;
 }