[PATCH 2/2] utils: indicate capability ROUTE_BUILD_MSG_SET_SCOPE

Thomas Haller thaller at redhat.com
Thu Feb 20 12:12:30 EST 2014


Signed-off-by: Thomas Haller <thaller at redhat.com>
---
 include/netlink/utils.h | 8 ++++++++
 lib/utils.c             | 1 +
 2 files changed, 9 insertions(+)

diff --git a/include/netlink/utils.h b/include/netlink/utils.h
index 3c1c460..9ab5f94 100644
--- a/include/netlink/utils.h
+++ b/include/netlink/utils.h
@@ -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)
 };
diff --git a/lib/utils.c b/lib/utils.c
index 3235f60..525c804 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -1128,6 +1128,7 @@ void dump_from_ops(struct nl_object *obj, struct nl_dump_params *params)
 const int *nl_get_capabilities ()
 {
 	static const int caps[] = {
+		NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE,
 		NL_CAPABILITY_NONE
 	};
 	return caps;
-- 
1.8.5.3




More information about the libnl mailing list