Page MenuHomeFreeBSD

D55171.id171433.diff
No OneTemporary

D55171.id171433.diff

diff --git a/sbin/ifconfig/ifconfig_netlink.c b/sbin/ifconfig/ifconfig_netlink.c
--- a/sbin/ifconfig/ifconfig_netlink.c
+++ b/sbin/ifconfig/ifconfig_netlink.c
@@ -78,7 +78,7 @@
"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*/
};
diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9
--- a/share/man/man9/ifnet.9
+++ b/share/man/man9/ifnet.9
@@ -761,9 +761,6 @@
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
diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c
--- a/sys/compat/linux/linux_netlink.c
+++ b/sys/compat/linux/linux_netlink.c
@@ -340,7 +340,6 @@
case IFF_STATICARP:
case IFF_STICKYARP:
case IFF_DYING:
- case IFF_RENAMING:
/* No Linux analogue */
break;
case IFF_MULTICAST:
diff --git a/sys/net/if.h b/sys/net/if.h
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -159,7 +159,6 @@
#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 */
diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -3022,14 +3022,6 @@
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 @@
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);
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -2291,8 +2291,6 @@
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
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -1164,9 +1164,6 @@
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;
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -761,9 +761,6 @@
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) {
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -3616,8 +3616,6 @@
struct vxlan_socket *vso;
struct vxlan_softc *sc, *tsc;
- if (ifp->if_flags & IFF_RENAMING)
- return;
if ((ifp->if_flags & IFF_MULTICAST) == 0)
return;
diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c
--- a/sys/netipsec/ipsec_offload.c
+++ b/sys/netipsec/ipsec_offload.c
@@ -829,8 +829,6 @@
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);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 1, 11:02 AM (8 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37709222
Default Alt Text
D55171.id171433.diff (3 KB)

Event Timeline