]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/iptable_mangle.c
Merge branch 'for-2.6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6] / net / ipv4 / netfilter / iptable_mangle.c
index 4e7998beda635970bacb483dae78052180d649c8..b91f3582359bf3aad31681e4c5d0f1e95c1bb4e6 100644 (file)
@@ -119,7 +119,7 @@ ipt_route_hook(unsigned int hook,
         const struct net_device *out,
         int (*okfn)(struct sk_buff *))
 {
-       return ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
+       return ipt_do_table(pskb, hook, in, out, &packet_mangler);
 }
 
 static unsigned int
@@ -131,7 +131,7 @@ ipt_local_hook(unsigned int hook,
 {
        unsigned int ret;
        u_int8_t tos;
-       u_int32_t saddr, daddr;
+       __be32 saddr, daddr;
        unsigned long nfmark;
 
        /* root is playing with raw sockets. */
@@ -148,7 +148,7 @@ ipt_local_hook(unsigned int hook,
        daddr = (*pskb)->nh.iph->daddr;
        tos = (*pskb)->nh.iph->tos;
 
-       ret = ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
+       ret = ipt_do_table(pskb, hook, in, out, &packet_mangler);
        /* Reroute for ANY change. */
        if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE
            && ((*pskb)->nh.iph->saddr != saddr
@@ -157,7 +157,8 @@ ipt_local_hook(unsigned int hook,
                || (*pskb)->nfmark != nfmark
 #endif
                || (*pskb)->nh.iph->tos != tos))
-               return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP;
+               if (ip_route_me_harder(pskb, RTN_UNSPEC))
+                       ret = NF_DROP;
 
        return ret;
 }