basic modification from way back
[powerpc.git] / net / netfilter / xt_hashlimit.c
index 47af19a..d3043fa 100644 (file)
@@ -216,10 +216,8 @@ static int htable_create(struct xt_hashlimit_info *minfo, int family)
        hinfo->pde->proc_fops = &dl_file_ops;
        hinfo->pde->data = hinfo;
 
-       init_timer(&hinfo->timer);
+       setup_timer(&hinfo->timer, htable_gc, (unsigned long )hinfo);
        hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval);
-       hinfo->timer.data = (unsigned long )hinfo;
-       hinfo->timer.function = htable_gc;
        add_timer(&hinfo->timer);
 
        spin_lock_bh(&hashlimit_lock);
@@ -392,10 +390,10 @@ hashlimit_init_dst(struct xt_hashlimit_htable *hinfo, struct dsthash_dst *dst,
 #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
        case AF_INET6:
                if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP)
-                       memcpy(&dst->addr.ip6.dst, &skb->nh.ipv6h->daddr,
+                       memcpy(&dst->addr.ip6.dst, &ipv6_hdr(skb)->daddr,
                               sizeof(dst->addr.ip6.dst));
                if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_SIP)
-                       memcpy(&dst->addr.ip6.src, &skb->nh.ipv6h->saddr,
+                       memcpy(&dst->addr.ip6.src, &ipv6_hdr(skb)->saddr,
                               sizeof(dst->addr.ip6.src));
 
                if (!(hinfo->cfg.mode &