lkml.org 
[lkml]   [2022]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH ipsec v2] Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
On Mon, May 23, 2022 at 10:05:24PM +0200, Michal Kubecek wrote:
> This reverts commit 4dc2a5a8f6754492180741facf2a8787f2c415d7.
>
> A non-zero return value from pfkey_broadcast() does not necessarily mean
> an error occurred as this function returns -ESRCH when no registered
> listener received the message. In particular, a call with
> BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
> zero so that this commit in fact prevents processing any PF_KEY message.
> One visible effect is that racoon daemon fails to find encryption
> algorithms like aes and refuses to start.
>
> Excluding -ESRCH return value would fix this but it's not obvious that
> we really want to bail out here and most other callers of
> pfkey_broadcast() also ignore the return value. Also, as pointed out by
> Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
> should use netlink instead so that we should only disturb the code for
> really important fixes.
>
> v2: add a comment explaining why is the return value ignored
>
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Applied, thanks Michal!

\
 
 \ /
  Last update: 2022-05-26 08:54    [W:0.120 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site