]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd/sd-rtnl/rtnl-types.c
sd-rtnl: Always enable IFA_FLAGS
[thirdparty/systemd.git] / src / libsystemd / sd-rtnl / rtnl-types.c
index 557dc59455c8e5e3af7f9e1394242aa34ddd0836..5ae47900a339ee93ae7d0abadf3533fc0f204925 100644 (file)
@@ -358,9 +358,7 @@ static const NLType rtnl_address_types[IFA_MAX + 1] = {
         [IFA_ANYCAST],
         [IFA_MULTICAST],
 */
-#ifdef IFA_FLAGS
         [IFA_FLAGS]             = { .type = NLA_U32 },
-#endif
 };
 
 static const NLTypeSystem rtnl_address_type_system = {
@@ -411,6 +409,7 @@ static const NLTypeSystem rtnl_neigh_type_system = {
 };
 
 static const NLType rtnl_types[RTM_MAX + 1] = {
+        [NLMSG_DONE]   = { .type = NLA_META, .size = 0 },
         [NLMSG_ERROR]  = { .type = NLA_META, .size = sizeof(struct nlmsgerr) },
         [RTM_NEWLINK]  = { .type = NLA_NESTED, .type_system = &rtnl_link_type_system, .size = sizeof(struct ifinfomsg) },
         [RTM_DELLINK]  = { .type = NLA_NESTED, .type_system = &rtnl_link_type_system, .size = sizeof(struct ifinfomsg) },
@@ -443,12 +442,12 @@ int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, ui
         assert(type_system->types);
 
         if (type > type_system->max)
-                return -ENOTSUP;
+                return -EOPNOTSUPP;
 
         nl_type = &type_system->types[type];
 
         if (nl_type->type == NLA_UNSPEC)
-                return -ENOTSUP;
+                return -EOPNOTSUPP;
 
         *ret = nl_type;
 
@@ -503,7 +502,7 @@ int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_union
 
         type = type_system_union->lookup(key);
         if (type < 0)
-                return -ENOTSUP;
+                return -EOPNOTSUPP;
 
         assert(type < type_system_union->num);
 
@@ -521,11 +520,11 @@ int type_system_union_protocol_get_type_system(const NLTypeSystemUnion *type_sys
         assert(ret);
 
         if (protocol >= type_system_union->num)
-                return -ENOTSUP;
+                return -EOPNOTSUPP;
 
         type_system = &type_system_union->type_systems[protocol];
         if (type_system->max == 0)
-                return -ENOTSUP;
+                return -EOPNOTSUPP;
 
         *ret = type_system;