All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Lahav Daniel Schlesinger <lschlesinger@drivenets.com>,
	David Ahern <dsahern@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Patch to fix 'ip' utility recvmsg with ancillary data
Date: Thu, 15 Jul 2021 09:07:06 +0200	[thread overview]
Message-ID: <ed9a4beb-1984-42c2-5cca-3101d285baf7@6wind.com> (raw)
In-Reply-To: <D2E7CEEB-B195-4A02-8D09-6595D74A5812@drivenets.com>

Le 14/07/2021 à 10:48, Lahav Daniel Schlesinger a écrit :
> Hi David, thanks for reviewing the patch!
> Here is the updated patch, I hope it's okay now:
> 
> ipmonitor: Fix recvmsg with ancillary data
> 
> 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.
> 
> Fixes: 449b824ad196 ("ipmonitor: allows to monitor in several netns")
> Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Signed-off-by: Lahav Schlesinger <lschlesinger@drivenets.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

[snip]

>> 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
The format is still unexpected. Please, consider using git send-email.


Regards,
Nicolas

      reply	other threads:[~2021-07-15  7:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13  8:09 Patch to fix 'ip' utility recvmsg with ancillary data Lahav Daniel Schlesinger
2021-07-13 16:30 ` David Ahern
2021-07-14  8:48   ` Lahav Daniel Schlesinger
2021-07-15  7:07     ` Nicolas Dichtel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed9a4beb-1984-42c2-5cca-3101d285baf7@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=dsahern@gmail.com \
    --cc=lschlesinger@drivenets.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.