patch-2.0.10 linux/net/ipv4/igmp.c
Next file: linux/net/ipv4/tcp.c
Previous file: linux/fs/isofs/inode.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Sat Jul 27 11:25:24 1996
- Orig file:
v2.0.9/linux/net/ipv4/igmp.c
- Orig date:
Mon May 13 12:15:24 1996
diff -u --recursive --new-file v2.0.9/linux/net/ipv4/igmp.c linux/net/ipv4/igmp.c
@@ -56,6 +56,11 @@
* Christian Daudt : igmp_heard_report now only calls
* igmp_timer_expire if tm->running is
* true (960216).
+ * Malcolm Beattie : ttl comparison wrong in igmp_rcv made
+ * igmp_heard_query never trigger. Expiry
+ * miscalculation fixed in igmp_heard_query
+ * and random() made to return unsigned to
+ * prevent negative expiry times.
*/
@@ -207,7 +212,7 @@
}
}
-extern __inline__ int random(void)
+extern __inline__ unsigned int random(void)
{
static unsigned long seed=152L;
seed=seed*69069L+1;
@@ -326,7 +331,7 @@
{
if(im->tm_running)
{
- if(im->timer.expires>max_resp_time*HZ/IGMP_TIMER_SCALE)
+ if(im->timer.expires>jiffies+max_resp_time*HZ/IGMP_TIMER_SCALE)
{
igmp_stop_timer(im);
igmp_start_timer(im,max_resp_time);
@@ -447,7 +452,7 @@
}
ih=(struct igmphdr *)skb->h.raw;
- if(skb->len <sizeof(struct igmphdr) || skb->ip_hdr->ttl>1 || ip_compute_csum((void *)skb->h.raw,sizeof(struct igmphdr)))
+ if(skb->len <sizeof(struct igmphdr) || skb->ip_hdr->ttl<1 || ip_compute_csum((void *)skb->h.raw,sizeof(struct igmphdr)))
{
kfree_skb(skb, FREE_READ);
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov