diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml
index 9211e25aa1..1a024a0c30 100644
--- a/man/systemd.net-naming-scheme.xml
+++ b/man/systemd.net-naming-scheme.xml
@@ -90,6 +90,10 @@
ww
Wireless wide area network (WWAN)
+
+ mc
+ Management Component Transport Protocol (MCTP)
+
@@ -561,6 +565,16 @@
+
+
+ v260
+
+ MCTP interfaces are now assigned persistent names, using a mc
+ prefix.
+
+
+
+
Note that latest may be used to denote the latest scheme known (to this
diff --git a/src/shared/netif-naming-scheme.c b/src/shared/netif-naming-scheme.c
index df16e69fb6..607094eecf 100644
--- a/src/shared/netif-naming-scheme.c
+++ b/src/shared/netif-naming-scheme.c
@@ -30,6 +30,7 @@ static const NamingScheme naming_schemes[] = {
{ "v257", NAMING_V257 },
{ "v258", NAMING_V258 },
{ "v259", NAMING_V259 },
+ { "v260", NAMING_V260 },
/* … add more schemes here, as the logic to name devices is updated … */
EXTRA_NET_NAMING_MAP
diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h
index 8448c4e957..a25b707b1c 100644
--- a/src/shared/netif-naming-scheme.h
+++ b/src/shared/netif-naming-scheme.h
@@ -43,6 +43,7 @@ typedef enum NamingSchemeFlags {
NAMING_DEVICETREE_PORT_ALIASES = 1 << 19, /* Include aliases of OF nodes of a netdev itself, not just its parent. See PR #33958. */
NAMING_USE_INTERFACE_PROPERTY = 1 << 20, /* Use INTERFACE udev property, rather than sysname, when no renaming is requested. */
NAMING_DEVICETREE_ALIASES_WLAN = 1 << 21, /* Generate names from devicetree aliases for WLAN devices */
+ NAMING_MCTP = 1 << 22, /* Use "mc" prefix for MCTP devices */
/* And now the masks that combine the features above */
NAMING_V238 = 0,
@@ -65,6 +66,7 @@ typedef enum NamingSchemeFlags {
NAMING_V257 = NAMING_V255 | NAMING_FIRMWARE_NODE_SUN | NAMING_DEVICETREE_PORT_ALIASES,
NAMING_V258 = NAMING_V257 | NAMING_USE_INTERFACE_PROPERTY,
NAMING_V259 = NAMING_V258 | NAMING_DEVICETREE_ALIASES_WLAN,
+ NAMING_V260 = NAMING_V259 | NAMING_MCTP,
EXTRA_NET_NAMING_SCHEMES
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index a41ecb1d43..d93849f332 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -1307,7 +1307,7 @@ static int get_ifname_prefix(sd_device *dev, const char **ret) {
if (r < 0)
return r;
- /* handle only ARPHRD_ETHER, ARPHRD_SLIP and ARPHRD_INFINIBAND devices */
+ /* handle only ARPHRD_ETHER, ARPHRD_SLIP, ARPHRD_INFINIBAND, and ARPHDR_MCTP devices */
switch (iftype) {
case ARPHRD_ETHER: {
if (device_is_devtype(dev, "wlan") > 0)
@@ -1329,6 +1329,13 @@ static int get_ifname_prefix(sd_device *dev, const char **ret) {
*ret = "sl";
return 0;
+ case ARPHRD_MCTP:
+ if (!naming_scheme_has(NAMING_MCTP))
+ return -EOPNOTSUPP;
+
+ *ret = "mc";
+ return 0;
+
default:
return -EOPNOTSUPP;
}