patch-2.3.99-pre7 linux/net/ipv4/ipmr.c

Next file: linux/net/ipv4/netfilter/ip_conntrack_core.c
Previous file: linux/net/ipv4/ipip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/net/ipv4/ipmr.c linux/net/ipv4/ipmr.c
@@ -9,7 +9,7 @@
  *	as published by the Free Software Foundation; either version
  *	2 of the License, or (at your option) any later version.
  *
- *	Version: $Id: ipmr.c,v 1.51 2000/03/17 14:41:52 davem Exp $
+ *	Version: $Id: ipmr.c,v 1.53 2000/05/05 02:17:17 davem Exp $
  *
  *	Fixes:
  *	Michael Chastain	:	Incorrect size of copying.
@@ -189,7 +189,7 @@
 	struct in_device *in_dev;
 	int size;
 
-	size = sizeof(*dev) + IFNAMSIZ + sizeof(struct net_device_stats);
+	size = sizeof(*dev) + sizeof(struct net_device_stats);
 	dev = kmalloc(size, GFP_KERNEL);
 	if (!dev)
 		return NULL;
@@ -197,7 +197,6 @@
 	memset(dev, 0, size);
 
 	dev->priv = dev + 1;
-	dev->name = dev->priv + sizeof(struct net_device_stats);
 
 	strcpy(dev->name, "pimreg");
 
@@ -321,7 +320,7 @@
 	struct mfc_cache *c, **cp;
 
 	if (!spin_trylock(&mfc_unres_lock)) {
-		mod_timer(&ipmr_expire_timer, jiffies + HZ/10);
+		mod_timer(&ipmr_expire_timer, jiffies+HZ/10);
 		return;
 	}
 
@@ -661,9 +660,7 @@
 		c->next = mfc_unres_queue;
 		mfc_unres_queue = c;
 
-		if (!del_timer(&ipmr_expire_timer))
-			ipmr_expire_timer.expires = c->mfc_un.unres.expires;
-		add_timer(&ipmr_expire_timer);
+		mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
 	}
 
 	/*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)