summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopa Prabhu <roopa@cumulusnetworks.com>2015-11-02 22:05:24 (GMT)
committerThomas Haller <thaller@redhat.com>2016-07-08 10:02:07 (GMT)
commite8abec0b4c6dcb2af752202fb022b89de0442234 (patch)
tree7271a4b61a1efadad9696c7543285fe1a6a52089
parent656f381ccf58785319bb0236595c896125d33ed0 (diff)
downloadlibnl-e8abec0b4c6dcb2af752202fb022b89de0442234.zip
libnl-e8abec0b4c6dcb2af752202fb022b89de0442234.tar.gz
libnl-e8abec0b4c6dcb2af752202fb022b89de0442234.tar.bz2
nl_object: add new ce_msgflags field to nl_object
This patch adds a new flag ce_msgflags to nl_object and adds a first user of this flag, the route object. This enables the route cache to make proper cache inclusion decisions based on netlink msg flags like NLM_F_APPEND, NLM_F_REPLACE Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
-rw-r--r--include/netlink-private/object-api.h1
-rw-r--r--lib/route/route_obj.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/netlink-private/object-api.h b/include/netlink-private/object-api.h
index 517e672..a5ecaa1 100644
--- a/include/netlink-private/object-api.h
+++ b/include/netlink-private/object-api.h
@@ -190,6 +190,7 @@ extern "C" {
struct nl_cache * ce_cache; \
struct nl_list_head ce_list; \
int ce_msgtype; \
+ int ce_msgflags; \
int ce_flags; \
uint64_t ce_mask;
diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c
index 0f52e00..f6f2147 100644
--- a/lib/route/route_obj.c
+++ b/lib/route/route_obj.c
@@ -1021,6 +1021,7 @@ int rtnl_route_parse(struct nlmsghdr *nlh, struct rtnl_route **result)
}
route->ce_msgtype = nlh->nlmsg_type;
+ route->ce_msgflags = nlh->nlmsg_flags;
err = nlmsg_parse(nlh, sizeof(struct rtmsg), tb, RTA_MAX, route_policy);
if (err < 0)