Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159832730
D30839.id91226.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30839.id91226.diff
View Options
diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5
--- a/sbin/devd/devd.conf.5
+++ b/sbin/devd/devd.conf.5
@@ -467,6 +467,8 @@
The network interface is attached to the system.
.It Li IFNET Ta Em inet Ta Li DETACH Ta
The network interface is detached from the system.
+.It Li IFNET Ta Em inet Ta Li RENAME Ta
+The network interface is renamed.
.It Li IFNET Ta Em inet Ta Li ADDR_ADD Ta
The network interface address added.
.It Li IFNET Ta Em inet Ta Li ADDR_DEL Ta
diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -2477,7 +2477,7 @@
size_t namelen, onamelen;
size_t descrlen;
char *descrbuf, *odescrbuf;
- char new_name[IFNAMSIZ];
+ char new_name[IFNAMSIZ], strbuf[IFNAMSIZ + 8];
struct ifaddr *ifa;
struct sockaddr_dl *sdl;
@@ -2682,6 +2682,9 @@
if_printf(ifp, "changing name to '%s'\n", new_name);
+ snprintf(strbuf, sizeof(strbuf), "name=%s", new_name);
+ devctl_notify("IFNET", ifp->if_xname, "RENAME", strbuf);
+
IF_ADDR_WLOCK(ifp);
strlcpy(ifp->if_xname, new_name, sizeof(ifp->if_xname));
ifa = ifp->if_addr;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 19, 3:40 PM (12 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34087942
Default Alt Text
D30839.id91226.diff (1 KB)
Attached To
Mode
D30839: add RENAME devctl event for IFNET
Attached
Detach File
Event Timeline
Log In to Comment