summaryrefslogtreecommitdiff
path: root/src/attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/attr.c')
-rw-r--r--src/attr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/attr.c b/src/attr.c
index 7357f43..16f390a 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -504,5 +504,18 @@ mnl_attr_nest_end(struct nlmsghdr *nlh, struct nlattr *start)
}
/**
+ * mnl_attr_nest_cancel - cancel an attribute nest
+ * \param nlh pointer to the netlink message
+ * \param start pointer to the attribute nest returned by mnl_attr_nest_start()
+ *
+ * This function updates the attribute header that identifies the nest.
+ */
+EXPORT_SYMBOL void
+mnl_attr_nest_cancel(struct nlmsghdr *nlh, struct nlattr *start)
+{
+ nlh->nlmsg_len -= mnl_nlmsg_get_payload_tail(nlh) - (void *)start;
+}
+
+/**
* @}
*/