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 @@
1#ifndef _LINUX_NF_TABLES_H1#ifndef _LINUX_NF_TABLES_H
2#define _LINUX_NF_TABLES_H2#define _LINUX_NF_TABLES_H
3 3
4#define NFT_TABLE_MAXNAMELEN 324#define NFT_NAME_MAXLEN 256
5#define NFT_TABLE_MAXNAMELEN NFT_NAME_MAXLEN
5#define NFT_CHAIN_MAXNAMELEN 326#define NFT_CHAIN_MAXNAMELEN 32
6#define NFT_SET_MAXNAMELEN 327#define NFT_SET_MAXNAMELEN 32
7#define NFT_OBJ_MAXNAMELEN 328#define NFT_OBJ_MAXNAMELEN 32