From 17a1b88f8e821919a15c55ec0ed78824bb510dbd Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 5 Jan 2019 21:14:42 +0000 Subject: [PATCH] xlat: update NETNSA_* constants * xlat/rtnl_nsid_attrs.in (NETNSA_TARGET_NSID, NETNSA_CURRENT_NSID): New constants introduced by Linux kernel commits v5.0-rc1~129^2~201^2~2 and v5.0-rc1~129^2~201^2, respectively. * rtnl_nsid.c (rtgenmsg_nla_decoders): Add NETNSA_TARGET_NSID and NETNSA_CURRENT_NSID. * NEWS: Mention this. --- NEWS | 4 ++-- rtnl_nsid.c | 8 +++++--- xlat/rtnl_nsid_attrs.in | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index d5ac6247..6f62d7bf 100644 --- a/NEWS +++ b/NEWS @@ -2,8 +2,8 @@ Noteworthy changes in release ?.?? (????-??-??) =============================================== * Improvements - * Updated lists of BPF_*, BTRFS_*, KERN_*, KVM_CAP_*, NDA_*, NT_*, PR_*, - SECCOMP_*, V4L2_*, and *_MAGIC constants. + * Updated lists of BPF_*, BTRFS_*, KERN_*, KVM_CAP_*, NDA_*, NETNSA_*, NT_*, + PR_*, SECCOMP_*, V4L2_*, and *_MAGIC constants. * Bug fixes * Fixed strace-k test on alpha. diff --git a/rtnl_nsid.c b/rtnl_nsid.c index 1bf191c8..88630109 100644 --- a/rtnl_nsid.c +++ b/rtnl_nsid.c @@ -18,9 +18,11 @@ #include "xlat/rtnl_nsid_attrs.h" static const nla_decoder_t rtgenmsg_nla_decoders[] = { - [NETNSA_NSID] = decode_nla_s32, - [NETNSA_PID] = decode_nla_u32, - [NETNSA_FD] = decode_nla_fd + [NETNSA_NSID] = decode_nla_s32, + [NETNSA_PID] = decode_nla_u32, + [NETNSA_FD] = decode_nla_fd, + [NETNSA_TARGET_NSID] = decode_nla_s32, + [NETNSA_CURRENT_NSID] = decode_nla_s32 }; DECL_NETLINK_ROUTE_DECODER(decode_rtgenmsg) diff --git a/xlat/rtnl_nsid_attrs.in b/xlat/rtnl_nsid_attrs.in index f5b01bfc..591fb23f 100644 --- a/xlat/rtnl_nsid_attrs.in +++ b/xlat/rtnl_nsid_attrs.in @@ -3,3 +3,5 @@ NETNSA_NONE 0 NETNSA_NSID 1 NETNSA_PID 2 NETNSA_FD 3 +NETNSA_TARGET_NSID 4 +NETNSA_CURRENT_NSID 5 -- 2.40.0