patch-2.1.22 linux/net/ipv6/addrconf.c

Next file: linux/net/ipv6/af_inet6.c
Previous file: linux/net/ipv4/udp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.21/linux/net/ipv6/addrconf.c linux/net/ipv6/addrconf.c
@@ -56,7 +56,6 @@
  *	AF_INET6 device list
  */
 struct inet6_dev		*inet6_dev_lst;
-int				in6_ifnum = 0;
 
 atomic_t			addr_list_lock = 0;
 
@@ -167,7 +166,7 @@
 
 	memset(dev6, 0, sizeof(struct inet6_dev));
 	dev6->dev = dev;
-	dev6->if_index = ++in6_ifnum;
+	dev6->if_index = dev->ifindex;
 
 	/*
 	 *	insert at head.
@@ -892,40 +891,6 @@
 
 err_exit:
 	return err;
-}
-
-/*
- *	Obtain if_index from device name
- */
-int addrconf_get_ifindex(void *arg)
-{
-	struct ifreq ifr;
-	int res = -ENODEV;
-	
-	if (copy_from_user(&ifr, arg, sizeof(struct ifreq)))
-	{
-		res = -EFAULT;		
-	}
-	else
-	{
-		struct inet6_dev *idev;
-
-		for (idev = inet6_dev_lst; idev; idev=idev->next)
-		{
-			if (!strncmp(ifr.ifr_name, idev->dev->name, IFNAMSIZ))
-			{
-				res = 0;
-				ifr.ifr_ifindex = idev->if_index;
-				if (copy_to_user(arg, &ifr, sizeof(ifr)))
-				{
-					res = -EFAULT;
-				}
-				break;
-			}
-		}
-	}
-
-	return res;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov