diff options
author | brooks <brooks@FreeBSD.org> | 2004-09-18 05:02:08 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2004-09-18 05:02:08 +0000 |
commit | 4b3d75c2281ca99da9eef9bd95efec6d81d97554 (patch) | |
tree | a29a257b27f47272de479d5b06205a33e7562e6a /sys/net/if.c | |
parent | 8aec51c329c7d24d5fb8fc6baa0b37934f242f09 (diff) | |
download | FreeBSD-src-4b3d75c2281ca99da9eef9bd95efec6d81d97554.zip FreeBSD-src-4b3d75c2281ca99da9eef9bd95efec6d81d97554.tar.gz |
Log the renaming of an interface. This should make it easier to follow
kernel log files.
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 7a84bf8..8f09e69 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1160,6 +1160,9 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) /* Announce the departure of the interface. */ rt_ifannouncemsg(ifp, IFAN_DEPARTURE); + log(LOG_INFO, "%s: changing name to '%s'\n", + ifp->if_xname, new_name); + strlcpy(ifp->if_xname, new_name, sizeof(ifp->if_xname)); ifa = ifaddr_byindex(ifp->if_index); IFA_LOCK(ifa); |