summaryrefslogtreecommitdiffstats
path: root/src/netlink.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2020-12-02 23:20:40 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2020-12-04 12:53:00 +0100
commit6975c6d39366e0a086a43fa984392e2231c1b193 (patch)
tree50677ff98632c4c160397dcd7d54d109bb0e94e5 /src/netlink.c
parenta8dc9e2a2b40d5d29b12920873bbe1f2cfeda8f6 (diff)
mnl: reply netlink error message might be larger than MNL_SOCKET_BUFFER_SIZE
Netlink attribute maximum size is 65536 bytes (given nla_len is 16-bits). NFTA_SET_ELEM_LIST_ELEMENTS stores as many set elements as possible that can fit into this netlink attribute. Netlink messages with NLMSG_ERROR type originating from the kernel contain the original netlink message as payload, they might be larger than 65536 bytes. Add NFT_MNL_ACK_MAXSIZE which estimates the maximum Netlink header coming as (error) reply from the kernel. This estimate is based on the maximum netlink message size that nft sends from userspace. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1464 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
0 files changed, 0 insertions, 0 deletions