]> err.no Git - linux-2.6/blobdiff - net/ipv4/igmp.c
[NETFILTER]: Convert old checksum helper names
[linux-2.6] / net / ipv4 / igmp.c
index 7dbc282d4f9f3eb86a363f19f0fa19f29f1ad97b..c560a9392b1d2974b795a631cd2a3da1778041bd 100644 (file)
@@ -349,17 +349,12 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size)
 
 static int igmpv3_sendpack(struct sk_buff *skb)
 {
-       struct iphdr *pip = ip_hdr(skb);
        struct igmphdr *pig = igmp_hdr(skb);
-       const int iplen = skb->tail - skb->network_header;
        const int igmplen = skb->tail - skb->transport_header;
 
-       pip->tot_len = htons(iplen);
-       ip_send_check(pip);
        pig->csum = ip_compute_csum(igmp_hdr(skb), igmplen);
 
-       return NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, skb->dev,
-                      dst_output);
+       return ip_local_out(skb);
 }
 
 static int grec_size(struct ip_mc_list *pmc, int type, int gdel, int sdel)
@@ -680,13 +675,11 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc,
        iph->daddr    = dst;
        iph->saddr    = rt->rt_src;
        iph->protocol = IPPROTO_IGMP;
-       iph->tot_len  = htons(IGMP_SIZE);
        ip_select_ident(iph, &rt->u.dst, NULL);
        ((u8*)&iph[1])[0] = IPOPT_RA;
        ((u8*)&iph[1])[1] = 4;
        ((u8*)&iph[1])[2] = 0;
        ((u8*)&iph[1])[3] = 0;
-       ip_send_check(iph);
 
        ih = (struct igmphdr *)skb_put(skb, sizeof(struct igmphdr));
        ih->type=type;
@@ -695,8 +688,7 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc,
        ih->group=group;
        ih->csum=ip_compute_csum((void *)ih, sizeof(struct igmphdr));
 
-       return NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
-                      dst_output);
+       return ip_local_out(skb);
 }
 
 static void igmp_gq_timer_expire(unsigned long data)
@@ -1234,9 +1226,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr)
        spin_lock_init(&im->lock);
 #ifdef CONFIG_IP_MULTICAST
        im->tm_running=0;
-       init_timer(&im->timer);
-       im->timer.data=(unsigned long)im;
-       im->timer.function=&igmp_timer_expire;
+       setup_timer(&im->timer, &igmp_timer_expire, (unsigned long)im);
        im->unsolicit_count = IGMP_Unsolicited_Report_Count;
        im->reporter = 0;
        im->gsquery = 0;
@@ -1338,13 +1328,11 @@ void ip_mc_init_dev(struct in_device *in_dev)
        in_dev->mc_tomb = NULL;
 #ifdef CONFIG_IP_MULTICAST
        in_dev->mr_gq_running = 0;
-       init_timer(&in_dev->mr_gq_timer);
-       in_dev->mr_gq_timer.data=(unsigned long) in_dev;
-       in_dev->mr_gq_timer.function=&igmp_gq_timer_expire;
+       setup_timer(&in_dev->mr_gq_timer, igmp_gq_timer_expire,
+                       (unsigned long)in_dev);
        in_dev->mr_ifc_count = 0;
-       init_timer(&in_dev->mr_ifc_timer);
-       in_dev->mr_ifc_timer.data=(unsigned long) in_dev;
-       in_dev->mr_ifc_timer.function=&igmp_ifc_timer_expire;
+       setup_timer(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire,
+                       (unsigned long)in_dev);
        in_dev->mr_qrv = IGMP_Unsolicited_Report_Count;
 #endif