]> granicus.if.org Git - libnl/commitdiff
utils: indicate capability NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE
authorThomas Haller <thaller@redhat.com>
Thu, 13 Mar 2014 12:16:51 +0000 (13:16 +0100)
committerThomas Haller <thaller@redhat.com>
Thu, 13 Mar 2014 12:16:51 +0000 (13:16 +0100)
This capability indicates that libnl does no longer overwrites
the route scope in rtnl_route_build_msg(), as fixed by commit
85ec9c7ad80c60f4f619472f2bb9d9595da93b26.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
include/netlink/utils.h
lib/utils.c

index da46a55c8e39dc3520b57d7f6ad0050ac2baa47b..2094bb42d9104ae9ed8a79b4346b3ab967503f31 100644 (file)
@@ -82,6 +82,14 @@ extern void  nl_dump_line(struct nl_dump_params *, const char *, ...);
 enum {
        NL_CAPABILITY_NONE,
 
+       /**
+        * rtnl_route_build_msg() no longer guesses the route scope
+        * if explicitly set to RT_SCOPE_NOWHERE.
+        * @ingroup utils
+        */
+       NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE         = 1,
+#define NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE
+
        __NL_CAPABILITY_MAX
 #define NL_CAPABILITY_MAX                               (__NL_CAPABILITY_MAX - 1)
 };
index 7ce06b0b50083d28ac733c56725b01ca74b1aee8..49ff1208c84fb1989d9ca35733afe732b7b87061 100644 (file)
@@ -1143,6 +1143,15 @@ int nl_has_capability (int capability)
                        _NL_SETV((i), 1, (v1)) | _NL_SETV((i), 5, (v5)) | \
                        _NL_SETV((i), 2, (v2)) | _NL_SETV((i), 6, (v6)) | \
                        _NL_SETV((i), 3, (v3)) | _NL_SETV((i), 7, (v7)) )
+               _NL_SET(0,
+                       NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE,
+                       0,
+                       0,
+                       0,
+                       0,
+                       0,
+                       0,
+                       0),
 #undef _NL_SET
 #undef _NL_SETV
 #undef _NL_ASSERT