diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-02-02 14:51:53 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-02-03 08:35:39 +0000 |
| commit | 624427e2e2bf16b96a2ee05cf6edfa3fd577fb96 (patch) | |
| tree | 7f05ea6e3d65f9bc41b10a698035ae477223f781 /sys/linux | |
| parent | 6ce93dd4258e133bb60b00fb7a0435b755be7bf4 (diff) | |
sys/linux: use a wider range for netlink attributes
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/socket_netlink.txt | 11 | ||||
| -rw-r--r-- | sys/linux/socket_netlink.txt.const | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/linux/socket_netlink.txt b/sys/linux/socket_netlink.txt index 310e8657c..79cfc10f5 100644 --- a/sys/linux/socket_netlink.txt +++ b/sys/linux/socket_netlink.txt @@ -113,16 +113,19 @@ type nlnest[TYPE, PAYLOAD] nlattr_tt[const[TYPE, int16:14], 0, 1, PAYLOAD] # nlattr with NLA_F_NET_BYTEORDER set (unused for now). type nlnetw[TYPE, PAYLOAD] nlattr_tt[const[TYPE, int16:14], 1, 0, PAYLOAD] +# NL80211 has probably the biggest number of netlink attributes. +include <include/uapi/linux/nl80211.h> +define NETLINK_MAX_ATTRIBUTES NL80211_ATTR_MAX + nl_generic_attr [ generic array[int8] -# NL80211 has 150 attributes. - typed nlattr_tt[int16:14[0:150], 0, 0, nl_generic_attr_data] - nested nlattr_tt[int16:14[0:150], 0, 1, array[nl_generic_attr_nonested]] + typed nlattr_tt[int16:14[0:NETLINK_MAX_ATTRIBUTES], 0, 0, nl_generic_attr_data] + nested nlattr_tt[int16:14[0:NETLINK_MAX_ATTRIBUTES], 0, 1, array[nl_generic_attr_nonested]] ] [varlen] nl_generic_attr_nonested [ generic array[int8] - typed nlattr_tt[int16:14[0:150], 0, 0, nl_generic_attr_data] + typed nlattr_tt[int16:14[0:NETLINK_MAX_ATTRIBUTES], 0, 0, nl_generic_attr_data] ] [varlen] nl_generic_attr_data [ diff --git a/sys/linux/socket_netlink.txt.const b/sys/linux/socket_netlink.txt.const index 4cb65d069..d4ea2a439 100644 --- a/sys/linux/socket_netlink.txt.const +++ b/sys/linux/socket_netlink.txt.const @@ -18,6 +18,7 @@ NETLINK_ISCSI = 8 NETLINK_KOBJECT_UEVENT = 15 NETLINK_LISTEN_ALL_NSID = 8 NETLINK_LIST_MEMBERSHIPS = 9 +NETLINK_MAX_ATTRIBUTES = 329 NETLINK_NETFILTER = 12 NETLINK_NFLOG = 5 NETLINK_NO_ENOBUFS = 5 |
