From cb7e98ab05b6d44b2cea672764b52a47dc2e26a5 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Thu, 16 May 2019 15:18:35 +0530 Subject: [PATCH] sd-netlink: add route netlink properties --- src/libsystemd/sd-netlink/netlink-types.c | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c index 9147003b3be..0a6bd330025 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -622,23 +622,23 @@ static const NLType rtnl_route_types[] = { [RTA_PRIORITY] = { .type = NETLINK_TYPE_U32 }, [RTA_PREFSRC] = { .type = NETLINK_TYPE_IN_ADDR }, /* 6? */ [RTA_METRICS] = { .type = NETLINK_TYPE_NESTED, .type_system = &rtnl_route_metrics_type_system}, -/* [RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) }, -*/ + [RTA_MULTIPATH] = { .size = sizeof(struct rtnexthop) }, [RTA_FLOW] = { .type = NETLINK_TYPE_U32 }, /* 6? */ -/* - RTA_CACHEINFO, - RTA_TABLE, - RTA_MARK, - RTA_MFC_STATS, - RTA_VIA, - RTA_NEWDST, -*/ + [RTA_CACHEINFO] = { .size = sizeof(struct rta_cacheinfo) }, + [RTA_TABLE] = { .type = NETLINK_TYPE_U32 }, + [RTA_MARK] = { .type = NETLINK_TYPE_U32 }, + [RTA_MFC_STATS] = { .type = NETLINK_TYPE_U64 }, + [RTA_VIA] = { .type = NETLINK_TYPE_U32 }, + [RTA_NEWDST] = { .type = NETLINK_TYPE_U32 }, [RTA_PREF] = { .type = NETLINK_TYPE_U8 }, -/* - RTA_ENCAP_TYPE, - RTA_ENCAP, - */ [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_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 }, }; static const NLTypeSystem rtnl_route_type_system = {