Use the more appropriate ifnet_byindex() instead of ifaddr_byindex().

This commit is contained in:
Ruslan Ermilov 2005-11-11 12:32:49 +00:00
parent f5071cacb1
commit f0a2ef4889
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152312

View File

@ -80,10 +80,10 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */
return EINVAL;
if (name[0] <= 0 || name[0] > if_index ||
ifaddr_byindex(name[0]) == NULL)
ifnet_byindex(name[0]) == NULL)
return ENOENT;
ifp = ifaddr_byindex(name[0])->ifa_ifp;
ifp = ifnet_byindex(name[0]);
switch(name[1]) {
default: