1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

net: Remove the IFF_RENAMING flag

This used to be needed when interface renames were broadcast using the
ifnet_departure_event eventhandler, but since commit 349fcf079c
("net: add ifnet_rename_event EVENTHANDLER(9) for interface renaming"),
it has no purpose.  Remove it.

Reviewed by:	pouria, zlei
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55171
This commit is contained in:
Mark Johnston
2026-02-09 23:24:02 +00:00
parent d8f7a7b44a
commit 93075bdb81
10 changed files with 1 additions and 28 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ static const char *IFFBITS[] = {
"STATICARP", /* 19:0x80000 IFF_STATICARP*/
"STICKYARP", /* 20:0x100000 IFF_STICKYARP*/
"DYING", /* 21:0x200000 IFF_DYING*/
"RENAMING", /* 22:0x400000 IFF_RENAMING*/
"", /* 22:0x400000 */
"PALLMULTI", /* 23:0x800000 IFF_PALLMULTI*/
"LOWER_UP", /* 24:0x1000000 IFF_NETLINK_1*/
};
-3
View File
@@ -761,9 +761,6 @@ Set when the
structure of this interface is being released and still has
.Va if_refcount
references.
.It Dv IFF_RENAMING
.Aq D
Set when this interface is being renamed.
.El
.Ss "Interface Capabilities Flags"
Interface capabilities are specialized features an interface may
-1
View File
@@ -340,7 +340,6 @@ rtnl_if_flags_to_linux(unsigned int if_flags)
case IFF_STATICARP:
case IFF_STICKYARP:
case IFF_DYING:
case IFF_RENAMING:
/* No Linux analogue */
break;
case IFF_MULTICAST:
-10
View File
@@ -3022,14 +3022,6 @@ if_rename(struct ifnet *ifp, char *new_name)
if (ifunit(new_name) != NULL)
return (EEXIST);
/*
* XXX: Locking. Nothing else seems to lock if_flags,
* and there are numerous other races with the
* ifunit() checks not being atomic with namespace
* changes (renames, vmoves, if_attach, etc).
*/
ifp->if_flags |= IFF_RENAMING;
if_printf(ifp, "changing name to '%s'\n", new_name);
IF_ADDR_WLOCK(ifp);
@@ -3058,8 +3050,6 @@ if_rename(struct ifnet *ifp, char *new_name)
EVENTHANDLER_INVOKE(ifnet_rename_event, ifp, old_name);
ifp->if_flags &= ~IFF_RENAMING;
snprintf(strbuf, sizeof(strbuf), "name=%s", new_name);
devctl_notify("IFNET", old_name, "RENAME", strbuf);
-1
View File
@@ -159,7 +159,6 @@ struct if_data {
#define IFF_STATICARP 0x80000 /* (n) static ARP */
#define IFF_STICKYARP 0x100000 /* (n) sticky ARP */
#define IFF_DYING 0x200000 /* (n) interface is winding down */
#define IFF_RENAMING 0x400000 /* (n) interface is being renamed */
#define IFF_PALLMULTI 0x800000 /* (n) user-requested allmulti mode */
#define IFF_NETLINK_1 0x1000000 /* (n) used by netlink */
-2
View File
@@ -2291,8 +2291,6 @@ bridge_ifdetach(void *arg __unused, struct ifnet *ifp)
if (bif)
sc = bif->bif_sc;
if (ifp->if_flags & IFF_RENAMING)
return;
if (V_bridge_cloner == NULL) {
/*
* This detach handler can be called after
-3
View File
@@ -1164,9 +1164,6 @@ lagg_port_ifdetach(void *arg __unused, struct ifnet *ifp)
if ((lp = ifp->if_lagg) == NULL)
return;
/* If the ifnet is just being renamed, don't do anything. */
if (ifp->if_flags & IFF_RENAMING)
return;
sc = lp->lp_softc;
-3
View File
@@ -761,9 +761,6 @@ vlan_ifdetach(void *arg __unused, struct ifnet *ifp)
struct ifvlan *ifv;
struct ifvlantrunk *trunk;
/* If the ifnet is just being renamed, don't do anything. */
if (ifp->if_flags & IFF_RENAMING)
return;
VLAN_XLOCK();
trunk = ifp->if_vlantrunk;
if (trunk == NULL) {
-2
View File
@@ -3616,8 +3616,6 @@ vxlan_ifdetach_event(void *arg __unused, struct ifnet *ifp)
struct vxlan_socket *vso;
struct vxlan_softc *sc, *tsc;
if (ifp->if_flags & IFF_RENAMING)
return;
if ((ifp->if_flags & IFF_MULTICAST) == 0)
return;
-2
View File
@@ -829,8 +829,6 @@ ipsec_accel_on_ifdown_impl(struct ifnet *ifp)
static void
ipsec_accel_ifdetach_event(void *arg __unused, struct ifnet *ifp)
{
if ((ifp->if_flags & IFF_RENAMING) != 0)
return;
ipsec_accel_on_ifdown_impl(ifp);
}