chiark / gitweb /
sd-rtnl: link - allow setting the change mask
[elogind.git] / src / libsystemd / sd-rtnl / rtnl-message.c
index 984115c3c0fc6413274f20938ebe7a286f53fb3e..af8f8cf76286c03502889b7406ca2602b37a3b23 100644 (file)
@@ -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;
 }