Allocate all table names dynamically to allow for arbitrary lengths but introduce NFT_NAME_MAXLEN as an upper sanity boundary. It's value was chosen to allow using a domain name as per RFC 1035.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -1,7 +1,8 @@ | |||
| 1 | #ifndef _LINUX_NF_TABLES_H | 1 | #ifndef _LINUX_NF_TABLES_H |
| 2 | #define _LINUX_NF_TABLES_H | 2 | #define _LINUX_NF_TABLES_H |
| 3 | 3 | ||
| 4 | #define NFT_TABLE_MAXNAMELEN 32 | 4 | #define NFT_NAME_MAXLEN 256 |
| 5 | #define NFT_TABLE_MAXNAMELEN NFT_NAME_MAXLEN | ||
| 5 | #define NFT_CHAIN_MAXNAMELEN 32 | 6 | #define NFT_CHAIN_MAXNAMELEN 32 |
| 6 | #define NFT_SET_MAXNAMELEN 32 | 7 | #define NFT_SET_MAXNAMELEN 32 |
| 7 | #define NFT_OBJ_MAXNAMELEN 32 | 8 | #define NFT_OBJ_MAXNAMELEN 32 |