igmp.c (31e4543db29fb85496a122b965d6482c8d1a2bfe) | igmp.c (492f64ce12e259abd85714d05b885e105bd8aeef) |
---|---|
1/* 2 * Linux NET3: Internet Group Management Protocol [IGMP] 3 * 4 * This code implements the IGMP protocol as defined in RFC1112. There has 5 * been a further revision of this protocol since which is now supported. 6 * 7 * If you have trouble with this module be careful what gcc you have used, 8 * the older version didn't come out right using gcc 2.5.8, the newer one --- 330 unchanged lines hidden (view full) --- 339 pip = ip_hdr(skb); 340 skb_put(skb, sizeof(struct iphdr) + 4); 341 342 pip->version = 4; 343 pip->ihl = (sizeof(struct iphdr)+4)>>2; 344 pip->tos = 0xc0; 345 pip->frag_off = htons(IP_DF); 346 pip->ttl = 1; | 1/* 2 * Linux NET3: Internet Group Management Protocol [IGMP] 3 * 4 * This code implements the IGMP protocol as defined in RFC1112. There has 5 * been a further revision of this protocol since which is now supported. 6 * 7 * If you have trouble with this module be careful what gcc you have used, 8 * the older version didn't come out right using gcc 2.5.8, the newer one --- 330 unchanged lines hidden (view full) --- 339 pip = ip_hdr(skb); 340 skb_put(skb, sizeof(struct iphdr) + 4); 341 342 pip->version = 4; 343 pip->ihl = (sizeof(struct iphdr)+4)>>2; 344 pip->tos = 0xc0; 345 pip->frag_off = htons(IP_DF); 346 pip->ttl = 1; |
347 pip->daddr = rt->rt_dst; 348 pip->saddr = rt->rt_src; | 347 pip->daddr = fl4.daddr; 348 pip->saddr = fl4.saddr; |
349 pip->protocol = IPPROTO_IGMP; 350 pip->tot_len = 0; /* filled in later */ 351 ip_select_ident(pip, &rt->dst, NULL); 352 ((u8*)&pip[1])[0] = IPOPT_RA; 353 ((u8*)&pip[1])[1] = 4; 354 ((u8*)&pip[1])[2] = 0; 355 ((u8*)&pip[1])[3] = 0; 356 --- 325 unchanged lines hidden (view full) --- 682 skb_put(skb, sizeof(struct iphdr) + 4); 683 684 iph->version = 4; 685 iph->ihl = (sizeof(struct iphdr)+4)>>2; 686 iph->tos = 0xc0; 687 iph->frag_off = htons(IP_DF); 688 iph->ttl = 1; 689 iph->daddr = dst; | 349 pip->protocol = IPPROTO_IGMP; 350 pip->tot_len = 0; /* filled in later */ 351 ip_select_ident(pip, &rt->dst, NULL); 352 ((u8*)&pip[1])[0] = IPOPT_RA; 353 ((u8*)&pip[1])[1] = 4; 354 ((u8*)&pip[1])[2] = 0; 355 ((u8*)&pip[1])[3] = 0; 356 --- 325 unchanged lines hidden (view full) --- 682 skb_put(skb, sizeof(struct iphdr) + 4); 683 684 iph->version = 4; 685 iph->ihl = (sizeof(struct iphdr)+4)>>2; 686 iph->tos = 0xc0; 687 iph->frag_off = htons(IP_DF); 688 iph->ttl = 1; 689 iph->daddr = dst; |
690 iph->saddr = rt->rt_src; | 690 iph->saddr = fl4.saddr; |
691 iph->protocol = IPPROTO_IGMP; 692 ip_select_ident(iph, &rt->dst, NULL); 693 ((u8*)&iph[1])[0] = IPOPT_RA; 694 ((u8*)&iph[1])[1] = 4; 695 ((u8*)&iph[1])[2] = 0; 696 ((u8*)&iph[1])[3] = 0; 697 698 ih = (struct igmphdr *)skb_put(skb, sizeof(struct igmphdr)); --- 1981 unchanged lines hidden --- | 691 iph->protocol = IPPROTO_IGMP; 692 ip_select_ident(iph, &rt->dst, NULL); 693 ((u8*)&iph[1])[0] = IPOPT_RA; 694 ((u8*)&iph[1])[1] = 4; 695 ((u8*)&iph[1])[2] = 0; 696 ((u8*)&iph[1])[3] = 0; 697 698 ih = (struct igmphdr *)skb_put(skb, sizeof(struct igmphdr)); --- 1981 unchanged lines hidden --- |