chiark / gitweb /
networkd: add back route destination support
[elogind.git] / src / network / networkd-link.c
index 3e35090d37453ea257681858e23c6c887a8edfa9..9e057ce0ff8bae0b7f6ea23c7e80dc0fd26af8c5 100644 (file)
@@ -596,7 +596,7 @@ static int route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata)
                                 "ERRNO=%d", -r,
                                 NULL);
 
-        return 0;
+        return 1;
 }
 
 static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
@@ -648,7 +648,7 @@ static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
                                 link->ifname, strerror(-r),
                                 "ERRNO=%d", -r,
                                 NULL);
-        if (r >= 0) {
+        else if (r >= 0) {
                 /* calling handler directly so take a ref */
                 link_ref(link);
                 link_get_address_handler(rtnl, m, link);
@@ -809,7 +809,7 @@ static int address_update_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userd
                                 "ERRNO=%d", -r,
                                 NULL);
 
-        return 0;
+        return 1;
 }
 
 static int address_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
@@ -832,7 +832,7 @@ static int address_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdat
                                 "ERRNO=%d", -r,
                                 NULL);
 
-        return 0;
+        return 1;
 }
 
 static int set_hostname_handler(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
@@ -2023,6 +2023,13 @@ static int link_configure(Link *link) {
                                         return r;
                         }
                 }
+
+                if (link->network->dhcp_vendor_class_identifier) {
+                        r = sd_dhcp_client_set_vendor_class_identifier(link->dhcp_client,
+                                                                       link->network->dhcp_vendor_class_identifier);
+                        if (r < 0)
+                                return r;
+                }
         }
 
         if (link->network->dhcp_server) {