diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-12-08 11:26:24 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-01-03 12:37:56 (GMT) |
commit | 42c41336000e1ff781a91c6ec397fd787aae3124 (patch) | |
tree | f9b73675536c6c905ba677cdbf504c8cbdf94c8c /lib/route | |
parent | 2cf635b06a678ebe09d6ea6db72bc09de09f84c8 (diff) | |
download | libnl-42c41336000e1ff781a91c6ec397fd787aae3124.zip libnl-42c41336000e1ff781a91c6ec397fd787aae3124.tar.gz libnl-42c41336000e1ff781a91c6ec397fd787aae3124.tar.bz2 |
add support for IFA_FLAGS nl attribute
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/route')
-rw-r--r-- | lib/route/addr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/route/addr.c b/lib/route/addr.c index 1ec298c..21f415d 100644 --- a/lib/route/addr.c +++ b/lib/route/addr.c @@ -216,8 +216,9 @@ static int addr_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, ifa = nlmsg_data(nlh); addr->a_family = family = ifa->ifa_family; addr->a_prefixlen = ifa->ifa_prefixlen; - addr->a_flags = ifa->ifa_flags; addr->a_scope = ifa->ifa_scope; + addr->a_flags = tb[IFA_FLAGS] ? nla_get_u32(tb[IFA_FLAGS]) : + ifa->ifa_flags; addr->a_ifindex = ifa->ifa_index; addr->ce_mask = (ADDR_ATTR_FAMILY | ADDR_ATTR_PREFIXLEN | @@ -597,6 +598,7 @@ static int build_addr_msg(struct rtnl_addr *tmpl, int cmd, int flags, NLA_PUT(msg, IFA_CACHEINFO, sizeof(ca), &ca); } + NLA_PUT_U32(msg, IFA_FLAGS, tmpl->a_flags); *result = msg; return 0; |