History

netfilter: nf_tables: Allow table names of up to 255 chars

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.

Phil Sutter committed 9 years ago

Commit e46abbc1 parent 2cf0c8b4 files · +40 −16Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+2−1
@@ -1,7 +1,8 @@
11 #ifndef _LINUX_NF_TABLES_H
22 #define _LINUX_NF_TABLES_H
33
4−#define NFT_TABLE_MAXNAMELEN 32
4+#define NFT_NAME_MAXLEN 256
5+#define NFT_TABLE_MAXNAMELEN NFT_NAME_MAXLEN
56 #define NFT_CHAIN_MAXNAMELEN 32
67 #define NFT_SET_MAXNAMELEN 32
78 #define NFT_OBJ_MAXNAMELEN 32