diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-03-01 12:52:31 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-03-03 13:48:34 +0100 |
commit | 25e94a997b324b5f167f56d56d7106d38b78c9de (patch) | |
tree | b393990fc6137004a3b1a1c568b522005ef6a72b /net/iucv | |
parent | netfilter: nft_set_rbtree: incorrect assumption on lower interval lookups (diff) | |
download | linux-25e94a997b324b5f167f56d56d7106d38b78c9de.tar.xz linux-25e94a997b324b5f167f56d56d7106d38b78c9de.zip |
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>
Diffstat (limited to 'net/iucv')
0 files changed, 0 insertions, 0 deletions