From 4b3d75c2281ca99da9eef9bd95efec6d81d97554 Mon Sep 17 00:00:00 2001 From: brooks Date: Sat, 18 Sep 2004 05:02:08 +0000 Subject: Log the renaming of an interface. This should make it easier to follow kernel log files. --- sys/net/if.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/net/if.c') 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); -- cgit v1.1