From: Guillaume Nault <gnault@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: [PATCH iproute2-next 0/5] ipnetns: cleanup and harden processing of netns ids
Date: Fri, 8 Nov 2019 18:00:08 +0100 [thread overview]
Message-ID: <cover.1573231189.git.gnault@redhat.com> (raw)
It's currently hard to review ipnetns. The netns ids are inconsistently
treated as signed or unsigned and most helper functions aren't prepared
to use negative ids.
Netns id attributes can be negative: NETNSA_NSID_NOT_ASSIGNED == -1.
So let's consistently treat nsids as signed and also reject negative
values in functions that are supposed to only handle assigned netns
ids.
While there, let's drop the extra blank line generated by some command
line parsing errors (patch 5/5).
Guillaume Nault (5):
ipnetns: treat NETNSA_NSID and NETNSA_CURRENT_NSID as signed
ipnetns: fix misleading comment about 'ip monitor nsid'
ipnetns: harden helper functions wrt. negative netns ids
ipnetns: don't print unassigned nsid in json export
ipnetns: remove blank lines printed by invarg() messages
ip/ipnetns.c | 49 +++++++++++++++++++++++++++++--------------------
1 file changed, 29 insertions(+), 20 deletions(-)
--
2.21.0
next reply other threads:[~2019-11-08 17:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 17:00 Guillaume Nault [this message]
2019-11-08 17:00 ` [PATCH iproute2-next 1/5] ipnetns: treat NETNSA_NSID and NETNSA_CURRENT_NSID as signed Guillaume Nault
2019-11-08 17:00 ` [PATCH iproute2-next 2/5] ipnetns: fix misleading comment about 'ip monitor nsid' Guillaume Nault
2019-11-08 17:00 ` [PATCH iproute2-next 3/5] ipnetns: harden helper functions wrt. negative netns ids Guillaume Nault
2019-11-08 17:00 ` [PATCH iproute2-next 4/5] ipnetns: don't print unassigned nsid in json export Guillaume Nault
2019-11-08 17:00 ` [PATCH iproute2-next 5/5] ipnetns: remove blank lines printed by invarg() messages Guillaume Nault
2019-11-09 1:36 ` [PATCH iproute2-next 0/5] ipnetns: cleanup and harden processing of netns ids David Ahern
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=cover.1573231189.git.gnault@redhat.com \
--to=gnault@redhat.com \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).