mirror of https://gitee.com/openkylin/linux.git
6001a930ce
A userspace daemon like firewalld might need to monitor for netlink updates to detect its ruleset removal by the (global) flush ruleset command to ensure ruleset persistency. This adds extra complexity from userspace and, for some little time, the firewall policy is not in place. This patch adds the NFT_TABLE_F_OWNER flag which allows a userspace program to own the table that creates in exclusivity. Tables that are owned... - can only be updated and removed by the owner, non-owners hit EPERM if they try to update it or remove it. - are destroyed when the owner closes the netlink socket or the process is gone (implicit netlink socket closure). - are skipped by the global flush ruleset command. - are listed in the global ruleset. The userspace process that sets on the NFT_TABLE_F_OWNER flag need to leave open the netlink socket. A new NFTA_TABLE_OWNER netlink attribute specifies the netlink port ID to identify the owner from userspace. This patch also updates error reporting when an unknown table flag is specified to change it from EINVAL to EOPNOTSUPP given that EINVAL is usually reserved to report for malformed netlink messages to userspace. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
||
---|---|---|
.. | ||
ipv4 | ||
ipv6 | ||
br_netfilter.h | ||
nf_conntrack.h | ||
nf_conntrack_acct.h | ||
nf_conntrack_bridge.h | ||
nf_conntrack_core.h | ||
nf_conntrack_count.h | ||
nf_conntrack_ecache.h | ||
nf_conntrack_expect.h | ||
nf_conntrack_extend.h | ||
nf_conntrack_helper.h | ||
nf_conntrack_l4proto.h | ||
nf_conntrack_labels.h | ||
nf_conntrack_seqadj.h | ||
nf_conntrack_synproxy.h | ||
nf_conntrack_timeout.h | ||
nf_conntrack_timestamp.h | ||
nf_conntrack_tuple.h | ||
nf_conntrack_zones.h | ||
nf_dup_netdev.h | ||
nf_flow_table.h | ||
nf_log.h | ||
nf_nat.h | ||
nf_nat_helper.h | ||
nf_nat_masquerade.h | ||
nf_nat_redirect.h | ||
nf_queue.h | ||
nf_reject.h | ||
nf_socket.h | ||
nf_synproxy.h | ||
nf_tables.h | ||
nf_tables_core.h | ||
nf_tables_ipv4.h | ||
nf_tables_ipv6.h | ||
nf_tables_offload.h | ||
nf_tproxy.h | ||
nft_fib.h | ||
nft_meta.h | ||
nft_reject.h | ||
xt_rateest.h |