summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2004-04-16 08:14:34 +0000
committerluigi <luigi@FreeBSD.org>2004-04-16 08:14:34 +0000
commit457dbfc9de09fed9d3132d09666cc5aae3384ca9 (patch)
treede7acf6306c99c01c924aee447bde1dcacc25d49 /sys/net/if.c
parent04b20ed153a29023f1a9fec90a36344cdc11f15f (diff)
downloadFreeBSD-src-457dbfc9de09fed9d3132d09666cc5aae3384ca9.zip
FreeBSD-src-457dbfc9de09fed9d3132d09666cc5aae3384ca9.tar.gz
Consistently use ifaddr_byindex() to access the link-level address
of an interface. No functional change. On passing, comment a likely bug in net/rtsock.c:sysctl_ifmalist() which, if confirmed, would deserve to be fixed and MFC'ed
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index e58cff8..534bdcf 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1359,7 +1359,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
rt_ifannouncemsg(ifp, IFAN_DEPARTURE);
strlcpy(ifp->if_xname, new_name, sizeof(ifp->if_xname));
- ifa = TAILQ_FIRST(&ifp->if_addrhead);
+ ifa = ifaddr_byindex(ifp->if_index);
IFA_LOCK(ifa);
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
namelen = strlen(new_name);
OpenPOWER on IntegriCloud