summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index ee52b1ce1e..90ed55d42c 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2364,7 +2364,11 @@ static int link_configure(Link *link) {
}
if (link_lldp_rx_enabled(link)) {
- r = sd_lldp_new(&link->lldp, link->ifindex);
+ r = sd_lldp_new(&link->lldp);
+ if (r < 0)
+ return r;
+
+ r = sd_lldp_set_ifindex(link->lldp, link->ifindex);
if (r < 0)
return r;