Merge branch 'e1000-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[pandora-kernel.git] / net / sched / act_simple.c
index 5fe8085..36e1eda 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <linux/rtnetlink.h>
+#include <net/netlink.h>
 #include <net/pkt_sched.h>
 
 #define TCA_ACT_SIMP 22
@@ -43,9 +44,9 @@ static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result
        d->tcf_bstats.bytes += skb->len;
        d->tcf_bstats.packets++;
 
-       /* print policy string followed by _ then packet count 
-        * Example if this was the 3rd packet and the string was "hello" 
-        * then it would look like "hello_3" (without quotes) 
+       /* print policy string followed by _ then packet count
+        * Example if this was the 3rd packet and the string was "hello"
+        * then it would look like "hello_3" (without quotes)
         **/
        printk("simple: %s_%d\n",
               (char *)d->tcfd_defdata, d->tcf_bstats.packets);
@@ -155,7 +156,7 @@ static inline int tcf_simp_cleanup(struct tc_action *a, int bind)
 static inline int tcf_simp_dump(struct sk_buff *skb, struct tc_action *a,
                                int bind, int ref)
 {
-       unsigned char *b = skb->tail;
+       unsigned char *b = skb_tail_pointer(skb);
        struct tcf_defact *d = a->priv;
        struct tc_defact opt;
        struct tcf_t t;
@@ -173,7 +174,7 @@ static inline int tcf_simp_dump(struct sk_buff *skb, struct tc_action *a,
        return skb->len;
 
 rtattr_failure:
-       skb_trim(skb, b - skb->data);
+       nlmsg_trim(skb, b);
        return -1;
 }