Re: [PATCH nf,v2] netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 02, 2017 at 03:49:49PM +0100, Pablo Neira Ayuso wrote:
> 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 the attribute,
>    which means that we likely need to allocate a larger message.
> 
> Before this patch, the internal ESRCH netlink error code which is very
> misleading. Netlink semantics mandate that listeners hit ENOBUFS if the
> socket buffer overruns.
> 
> Reported-by: Alexander Alemayhu <alexander@xxxxxxxxxxxx>
> Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>

Tested-by: Alexander Alemayhu <alexander@xxxxxxxxxxxx>

-- 
Mit freundlichen Grüßen

Alexander Alemayhu
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux