diff options
author | Viktor Mihajlovski <mihajlov@linux.ibm.com> | 2021-04-27 15:25:16 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-04-29 21:38:21 +0200 |
commit | 5a7eb46c0206411d380543021291b4bca0b6f59f (patch) | |
tree | 1b644ff5db0db683e9d3a774df94a2eda57a06c0 /src/shared | |
parent | 34bcc67681835d4e7ebba816f3245e72def635fd (diff) | |
download | systemd-5a7eb46c0206411d380543021291b4bca0b6f59f.tar.gz |
udev: allow onboard index up to 65535
The maximum allowed value of the sysfs device index entry was limited to
16383 (2^14-1) to avoid the generation of unreasonable onboard interface
names.
For s390 the index can assume a value of up to 65535 (2^16-1) which is
now allowed depending on the new naming flag NAMING_16BIT_INDEX.
Larger index values are considered unreasonable and remain to be
ignored.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/netif-naming-scheme.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h index f719744d56..c0f94d0407 100644 --- a/src/shared/netif-naming-scheme.h +++ b/src/shared/netif-naming-scheme.h @@ -33,6 +33,7 @@ typedef enum NamingSchemeFlags { NAMING_NSPAWN_LONG_HASH = 1 << 8, /* Shorten nspawn interfaces by including 24bit hash, instead of simple truncation */ NAMING_BRIDGE_NO_SLOT = 1 << 9, /* Don't use PCI hotplug slot information if the corresponding device is a PCI bridge */ NAMING_SLOT_FUNCTION_ID = 1 << 10, /* Use function_id if present to identify PCI hotplug slots */ + NAMING_16BIT_INDEX = 1 << 11, /* Allow full 16-bit for the onboard index */ /* And now the masks that combine the features above */ NAMING_V238 = 0, @@ -42,7 +43,7 @@ typedef enum NamingSchemeFlags { NAMING_V243 = NAMING_V241 | NAMING_NETDEVSIM | NAMING_LABEL_NOPREFIX, NAMING_V245 = NAMING_V243 | NAMING_NSPAWN_LONG_HASH, NAMING_V247 = NAMING_V245 | NAMING_BRIDGE_NO_SLOT, - NAMING_V249 = NAMING_V247 | NAMING_SLOT_FUNCTION_ID, + NAMING_V249 = NAMING_V247 | NAMING_SLOT_FUNCTION_ID | NAMING_16BIT_INDEX, _NAMING_SCHEME_FLAGS_INVALID = -EINVAL, } NamingSchemeFlags; |