patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / net / ipv4 / netfilter / ip_fw_compat.c
index a45090d..f7146f3 100644 (file)
@@ -69,7 +69,8 @@ fw_in(unsigned int hooknum,
        /* Assume worse case: any hook could change packet */
        (*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED;
        if ((*pskb)->ip_summed == CHECKSUM_HW)
-               (*pskb)->ip_summed = CHECKSUM_NONE;
+               if (skb_checksum_help(pskb, (out == NULL)))
+                       return NF_DROP;
 
        switch (hooknum) {
        case NF_IP_PRE_ROUTING:
@@ -181,7 +182,7 @@ static unsigned int fw_confirm(unsigned int hooknum,
 
 extern int ip_fw_ctl(int optval, void *m, unsigned int len);
 
-static int sock_fn(struct sock *sk, int optval, void *user, unsigned int len)
+static int sock_fn(struct sock *sk, int optval, void __user *user, unsigned int len)
 {
        /* MAX of:
           2.2: sizeof(struct ip_fwtest) (~14x4 + 3x4 = 17x4)