From e8abec0b4c6dcb2af752202fb022b89de0442234 Mon Sep 17 00:00:00 2001 From: Roopa Prabhu Date: Mon, 2 Nov 2015 14:05:24 -0800 Subject: 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 --- include/netlink-private/object-api.h | 1 + lib/route/route_obj.c | 1 + 2 files changed, 2 insertions(+) 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) -- cgit v0.12