summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-01-21 15:20:42 +0100
committerTom Gundersen <teg@jklm.no>2014-01-22 17:56:49 +0100
commit5d4795f3722911ccd7953c0cf112c1f7624ea834 (patch)
treea5b42630e34d3cbb66dc7b14d696e9c08f87a4cd /src/libsystemd/sd-rtnl/rtnl-message.c
parent41add995cf7d61e299cb859a7f63117e2b4de312 (diff)
sd-rtnl: link - allow setting the change mask
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-message.c')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 984115c3c0..af8f8cf762 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -167,13 +167,16 @@ int sd_rtnl_message_route_new(uint16_t nlmsg_type, unsigned char rtm_family,
return 0;
}
-int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags) {
+int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsigned change) {
struct ifinfomsg *ifi;
ifi = NLMSG_DATA(m->hdr);
ifi->ifi_flags = flags;
- ifi->ifi_change = 0xffffffff;
+ if (change)
+ ifi->ifi_change = change;
+ else
+ ifi->ifi_change = 0xffffffff;
return 0;
}