* If neither is set or a failure occurs, return false, which is the default for this flag.
*/
r = link->network->dhcp_broadcast;
- if (r < 0 && link->sd_device && sd_device_get_property_value(link->sd_device, "ID_NET_DHCP_BROADCAST", &val) >= 0) {
+ if (r < 0 && link->dev && sd_device_get_property_value(link->dev, "ID_NET_DHCP_BROADCAST", &val) >= 0) {
r = parse_boolean(val);
if (r < 0)
log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to parse ID_NET_DHCP_BROADCAST, ignoring: %m");
if (r < 0)
return r;
- if (link->sd_device &&
- net_get_unique_predictable_data(link->sd_device, true, &seed) >= 0) {
+ if (link->dev &&
+ net_get_unique_predictable_data(link->dev, true, &seed) >= 0) {
r = sd_ipv4ll_set_address_seed(link->ipv4ll, seed);
if (r < 0)
return r;
assert(link);
assert(ret);
- r = net_get_type_string(link->sd_device, link->iftype, &type);
+ r = net_get_type_string(link->dev, link->iftype, &type);
if (r == -ENOMEM)
return r;
w = json_variant_unref(w);
- r = device_build_json(link->sd_device, &w);
+ r = device_build_json(link->dev, &w);
if (r < 0)
return r;
unlink_and_free(link->lldp_file);
unlink_and_free(link->state_file);
- sd_device_unref(link->sd_device);
+ sd_device_unref(link->dev);
netdev_unref(link->netdev);
hashmap_free(link->bound_to_links);
r = net_match_config(
&network->match,
- link->sd_device,
+ link->dev,
&link->hw_addr,
&link->permanent_hw_addr,
link->driver,
if (r == 0)
continue;
- if (network->match.ifname && link->sd_device) {
+ if (network->match.ifname && link->dev) {
uint8_t name_assign_type = NET_NAME_UNKNOWN;
const char *attr;
- if (sd_device_get_sysattr_value(link->sd_device, "name_assign_type", &attr) >= 0)
+ if (sd_device_get_sysattr_value(link->dev, "name_assign_type", &attr) >= 0)
(void) safe_atou8(attr, &name_assign_type);
warn = name_assign_type == NET_NAME_ENUM;
/* Always replace with the new sd_device object. As the sysname (and possibly other properties
* or sysattrs) may be outdated. */
- device_unref_and_replace(link->sd_device, device);
+ device_unref_and_replace(link->dev, device);
/* Do not ignore unamanaged state case here. If an interface is renamed after being once
* configured, and the corresponding .network file has Name= in [Match] section, then the