From f5b7deb96970e0fdf00120fdc9f46bf4e773bb90 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 4 Feb 2021 23:32:12 +0900 Subject: [PATCH 1/2] sd-netlink: add RTA_NH_ID attribute support --- src/libsystemd/sd-netlink/netlink-types.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c index 87ce45b4c9..ec1100894e 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -733,14 +733,15 @@ static const NLType rtnl_route_types[] = { [RTA_VIA] = { /* See struct rtvia */ }, [RTA_NEWDST] = { .type = NETLINK_TYPE_U32 }, [RTA_PREF] = { .type = NETLINK_TYPE_U8 }, - [RTA_EXPIRES] = { .type = NETLINK_TYPE_U32 }, [RTA_ENCAP_TYPE] = { .type = NETLINK_TYPE_U16 }, [RTA_ENCAP] = { .type = NETLINK_TYPE_NESTED }, /* Multiple type systems i.e. LWTUNNEL_ENCAP_MPLS/LWTUNNEL_ENCAP_IP/LWTUNNEL_ENCAP_ILA etc... */ + [RTA_EXPIRES] = { .type = NETLINK_TYPE_U32 }, [RTA_UID] = { .type = NETLINK_TYPE_U32 }, [RTA_TTL_PROPAGATE] = { .type = NETLINK_TYPE_U8 }, [RTA_IP_PROTO] = { .type = NETLINK_TYPE_U8 }, [RTA_SPORT] = { .type = NETLINK_TYPE_U16 }, [RTA_DPORT] = { .type = NETLINK_TYPE_U16 }, + [RTA_NH_ID] = { .type = NETLINK_TYPE_U32 }, }; static const NLTypeSystem rtnl_route_type_system = { From 4684ec5e3d91af3425333f76216f83213a1127eb Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 15 Feb 2021 02:38:28 +0900 Subject: [PATCH 2/2] netlink: add nexthop related types --- src/libsystemd/sd-netlink/netlink-types.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c index ec1100894e..78a3e8f973 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -805,8 +805,16 @@ static const NLTypeSystem rtnl_routing_policy_rule_type_system = { static const NLType rtnl_nexthop_types[] = { [NHA_ID] = { .type = NETLINK_TYPE_U32 }, + [NHA_GROUP] = { /* array of struct nexthop_grp */ }, + [NHA_GROUP_TYPE] = { .type = NETLINK_TYPE_U16 }, + [NHA_BLACKHOLE] = { .type = NETLINK_TYPE_FLAG }, [NHA_OIF] = { .type = NETLINK_TYPE_U32 }, [NHA_GATEWAY] = { .type = NETLINK_TYPE_IN_ADDR }, + [NHA_ENCAP_TYPE] = { .type = NETLINK_TYPE_U16 }, + [NHA_ENCAP] = { .type = NETLINK_TYPE_NESTED }, + [NHA_GROUPS] = { .type = NETLINK_TYPE_FLAG }, + [NHA_MASTER] = { .type = NETLINK_TYPE_U32 }, + [NHA_FDB] = { .type = NETLINK_TYPE_FLAG }, }; static const NLTypeSystem rtnl_nexthop_type_system = {