linux/include/net/netfilter
Pablo Neira Ayuso 25e94a997b netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails
The underlying nlmsg_multicast() already sets sk->sk_err for us to
notify socket overruns, so we should not do anything with this return
value. So we just call nfnetlink_set_err() if:

1) We fail to allocate the netlink message.

or

2) We don't have enough space in the netlink message to place attributes,
   which means that we likely need to allocate a larger message.

Before this patch, the internal ESRCH netlink error code was propagated
to userspace, which is quite misleading. Netlink semantics mandate that
listeners just hit ENOBUFS if the socket buffer overruns.

Reported-by: Alexander Alemayhu <alexander@alemayhu.com>
Tested-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2017-03-03 13:48:34 +01:00
..
ipv4
ipv6
br_netfilter.h
nf_conntrack.h netfilter: merge ctinfo into nfct pointer storage area 2017-02-02 14:31:56 +01:00
nf_conntrack_acct.h
nf_conntrack_core.h skbuff: add and use skb_nfct helper 2017-02-02 14:31:53 +01:00
nf_conntrack_ecache.h
nf_conntrack_expect.h
nf_conntrack_extend.h
nf_conntrack_helper.h
nf_conntrack_l3proto.h
nf_conntrack_l4proto.h netfilter: conntrack: no need to pass ctinfo to error handler 2017-02-02 14:31:51 +01:00
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_log.h netfilter: allow logging from non-init namespaces 2017-02-02 14:31:58 +01:00
nf_nat.h
nf_nat_core.h
nf_nat_helper.h
nf_nat_l3proto.h
nf_nat_l4proto.h
nf_nat_redirect.h
nf_queue.h
nf_socket.h
nf_tables.h netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails 2017-03-03 13:48:34 +01:00
nf_tables_core.h
nf_tables_ipv4.h
nf_tables_ipv6.h
nfnetlink_log.h
nft_dup.h
nft_fib.h
nft_masq.h
nft_meta.h
nft_redir.h
nft_reject.h
xt_rateest.h