summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
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;
}