[PATCH 2/2] utils: indicate capability NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE
Thomas Haller
thaller at redhat.com
Sun Feb 23 07:01:37 EST 2014
Signed-off-by: Thomas Haller <thaller at redhat.com>
---
include/netlink/utils.h | 8 ++++++++
lib/utils.c | 9 +++++++++
2 files changed, 17 insertions(+)
diff --git a/include/netlink/utils.h b/include/netlink/utils.h
index da46a55..2094bb4 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 e85c121..c05a3b7 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -1134,6 +1134,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
--
1.8.5.3
More information about the libnl
mailing list