]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/sched/cls_u32.c
[SK_BUFF]: Introduce skb_network_header()
[net-next-2.6.git] / net / sched / cls_u32.c
index 8b51948019958b39f182a6119735cc7a50c94a22..695b34051b9f5940742b8a8dc774807985423091 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/socket.h>
@@ -120,7 +119,7 @@ static int u32_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_re
        } stack[TC_U32_MAXDEPTH];
 
        struct tc_u_hnode *ht = (struct tc_u_hnode*)tp->root;
-       u8 *ptr = skb->nh.raw;
+       u8 *ptr = skb_network_header(skb);
        struct tc_u_knode *n;
        int sdepth = 0;
        int off2 = 0;
@@ -760,7 +759,7 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh,
                        RTA_PUT(skb, TCA_U32_INDEV, IFNAMSIZ, n->indev);
 #endif
 #ifdef CONFIG_CLS_U32_PERF
-               RTA_PUT(skb, TCA_U32_PCNT, 
+               RTA_PUT(skb, TCA_U32_PCNT,
                sizeof(struct tc_u32_pcnt) + n->sel.nkeys*sizeof(u64),
                        n->pf);
 #endif
@@ -810,7 +809,7 @@ static int __init init_u32(void)
        return register_tcf_proto_ops(&cls_u32_ops);
 }
 
-static void __exit exit_u32(void) 
+static void __exit exit_u32(void)
 {
        unregister_tcf_proto_ops(&cls_u32_ops);
 }