From 27e141b4426fcda89dabce4fa32e5e69c50b2036 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Mon, 12 Feb 2018 20:02:58 +0100 Subject: [PATCH] rtnl_link: add decoding of new IFLA_* attributes * xlat/rtnl_link_attrs.in (IFLA_NEW_NETNSID, IFLA_IF_NETNSID, IFLA_CARRIER_UP_COUNT, IFLA_CARRIER_DOWN_COUNT, IFLA_NEW_IFINDEX): New constants introduced by linux kernel commits v4.15-rc1~84^2~557, v4.15-rc1~84^2~133^2, v4.16-rc1~123^2~91, and v4.16-rc1~123^2~24^2. * rtnl_link.c (ifinfomsg_nla_decoders) : New items. --- rtnl_link.c | 5 +++++ xlat/rtnl_link_attrs.in | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/rtnl_link.c b/rtnl_link.c index b2ebde2b..a01452fa 100644 --- a/rtnl_link.c +++ b/rtnl_link.c @@ -437,6 +437,11 @@ static const nla_decoder_t ifinfomsg_nla_decoders[] = { [IFLA_PAD] = NULL, [IFLA_XDP] = decode_ifla_xdp, [IFLA_EVENT] = decode_ifla_event, + [IFLA_NEW_NETNSID] = decode_nla_s32, + [IFLA_IF_NETNSID] = decode_nla_s32, + [IFLA_CARRIER_UP_COUNT] = decode_nla_u32, + [IFLA_CARRIER_DOWN_COUNT] = decode_nla_u32, + [IFLA_NEW_IFINDEX] = decode_nla_s32, }; DECL_NETLINK_ROUTE_DECODER(decode_ifinfomsg) diff --git a/xlat/rtnl_link_attrs.in b/xlat/rtnl_link_attrs.in index eb7f4754..9ba08ad9 100644 --- a/xlat/rtnl_link_attrs.in +++ b/xlat/rtnl_link_attrs.in @@ -43,3 +43,8 @@ IFLA_GSO_MAX_SIZE 41 IFLA_PAD 42 IFLA_XDP 43 IFLA_EVENT 44 +IFLA_NEW_NETNSID 45 +IFLA_IF_NETNSID 46 +IFLA_CARRIER_UP_COUNT 47 +IFLA_CARRIER_DOWN_COUNT 48 +IFLA_NEW_IFINDEX 49 -- 2.40.0