initramfs: fix initramfs size calculation
[linux-drm-fsl-dcu.git] / net / sched / em_u32.c
index cd0600c6796984b955d26f4b5cc65e46aba8c4e6..953f1479f7da2d4af4015440fc708ffda9d81670 100644 (file)
@@ -22,7 +22,7 @@ static int em_u32_match(struct sk_buff *skb, struct tcf_ematch *em,
                        struct tcf_pkt_info *info)
 {
        struct tc_u32_key *key = (struct tc_u32_key *) em->data;
-       unsigned char *ptr = skb->nh.raw;
+       const unsigned char *ptr = skb_network_header(skb);
 
        if (info) {
                if (info->ptr)
@@ -35,7 +35,7 @@ static int em_u32_match(struct sk_buff *skb, struct tcf_ematch *em,
        if (!tcf_valid_offset(skb, ptr, sizeof(u32)))
                return 0;
 
-       return !(((*(u32*) ptr)  ^ key->val) & key->mask);
+       return !(((*(__be32*) ptr)  ^ key->val) & key->mask);
 }
 
 static struct tcf_ematch_ops em_u32_ops = {
@@ -60,3 +60,5 @@ MODULE_LICENSE("GPL");
 
 module_init(init_em_u32);
 module_exit(exit_em_u32);
+
+MODULE_ALIAS_TCF_EMATCH(TCF_EM_U32);