[NETFILTER]: ipt annotations
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / ipv4 / netfilter / ipt_TOS.c
index 471a4c438b0af123ec174e8e51bcae9b27be7695..6b8b14ccc3d3ff9a0fa0610a0e08df6d274cf2ef 100644 (file)
@@ -30,7 +30,7 @@ target(struct sk_buff **pskb,
 {
        const struct ipt_tos_target_info *tosinfo = targinfo;
        struct iphdr *iph = (*pskb)->nh.iph;
-       u_int16_t oldtos;
+       __be16 oldtos;
 
        if ((iph->tos & IPTOS_TOS_MASK) != tosinfo->tos) {
                if (!skb_make_writable(pskb, sizeof(struct iphdr)))
@@ -38,7 +38,7 @@ target(struct sk_buff **pskb,
                iph = (*pskb)->nh.iph;
                oldtos = iph->tos;
                iph->tos = (iph->tos & IPTOS_PREC_MASK) | tosinfo->tos;
-               iph->check = nf_csum_update(oldtos ^ 0xFFFF, iph->tos,
+               iph->check = nf_csum_update(oldtos ^ htons(0xFFFF), iph->tos,
                                            iph->check);
        }
        return IPT_CONTINUE;