]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/sched/act_simple.c
[NETLINK]: Use nlmsg_trim() where appropriate
[net-next-2.6.git] / net / sched / act_simple.c
index c7971182af0752d67b267a22e607f58dc0dd1613..36e1edad599017866a62d179b5b576520cf43875 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
@@ -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;
 }