ipnetns: cleanup and harden processing of netns ids
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ipnetns: treat NETNSA_NSID and NETNSA_CURRENT_NSID as signedip/ | +7 | 0 replies | |
| 2/5 | ipnetns: fix misleading comment about 'ip monitor nsid'ip/ | +1 | 0 replies | |
| 3/5 | ipnetns: harden helper functions wrt. negative netns idsip/ | +12 | 0 replies | |
| 4/5 | ipnetns: don't print unassigned nsid in json exportip/ | +3 | 0 replies | |
| 5/5 | ipnetns: remove blank lines printed by invarg() messagesip/ | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH iproute2-next 0/5] ipnetns: cleanup and harden processing of netns ids
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(-)
Signature · 1 line
2.21.0