[NETLINK]: Use nlmsg_trim() where appropriate
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / sched / act_ipt.c
index 2ccfd5b20fab9708b4569f028b8bc737fa2bf274..00b05f422d45016195f124c81c1ab7d31aab62ab 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/init.h>
 #include <linux/proc_fs.h>
 #include <linux/kmod.h>
+#include <net/netlink.h>
 #include <net/sock.h>
 #include <net/pkt_sched.h>
 #include <linux/tc_act/tc_ipt.h>
@@ -277,7 +278,7 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int
        return skb->len;
 
 rtattr_failure:
-       skb_trim(skb, b - skb->data);
+       nlmsg_trim(skb, b);
        kfree(t);
        return -1;
 }