[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e3cbedf-0ac8-8599-f713-294733301680@gmail.com>
Date: Tue, 13 Jul 2021 10:30:21 -0600
From: David Ahern <dsahern@...il.com>
To: Lahav Daniel Schlesinger <lschlesinger@...venets.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: Patch to fix 'ip' utility recvmsg with ancillary data
On 7/13/21 2:09 AM, Lahav Daniel Schlesinger wrote:
>
>
> A successful call to recvmsg() causes msg.msg_controllen to contain the length of the received ancillary data. However, the current code in the 'ip' utility doesn't reset this value after each recvmsg().
>
> This means that if a call to recvmsg() doesn't have ancillary data, then msg.msg_controllen will be set to 0, causing future recvmsg() which do contain ancillary data to get MSG_CTRUNC set in msg.msg_flags.
>
> This fixes 'ip monitor' running with the all-nsid option - With this option the kernel passes the nsid as ancillary data. If while 'ip monitor' is running an even on the current netns is received, then no ancillary data will be sent, causing msg.msg_controllen to be set to 0, which causes 'ip monitor' to indefinitely print "[nsid current]" instead of the real nsid.
>
patch looks right. Can you send it as a formal patch with a commit log
message, Signed-off-by, etc. See 'git log' for expected format and
Documentation/process/submitting-patches.rst in the kernel tree. Make
sure you add:
Fixes: 449b824ad196 (“ipmonitor: allows to monitor in several netns”)
Cc: Nicolas Dichtel <nicolas.dichtel@...nd.com>
and make sure Nicolas is cc'ed on the send.
Powered by blists - more mailing lists