From: Vincent Bernat Date: Mon, 8 Feb 2016 16:42:03 +0000 (+0100) Subject: interfaces: when no alias available, use interface name X-Git-Tag: 0.9.1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48eaeeb77b9ea5ef61b179a215ba91b08ced764f;p=thirdparty%2Flldpd.git interfaces: when no alias available, use interface name Even if the interface name was already used as port ID. --- diff --git a/src/daemon/interfaces.c b/src/daemon/interfaces.c index 009a5784..b3f99346 100644 --- a/src/daemon/interfaces.c +++ b/src/daemon/interfaces.c @@ -524,6 +524,10 @@ interfaces_helper_port_name_desc(struct lldpd *cfg, free(port->p_descr); if (has_alias) { port->p_descr = strdup(iface->alias); + } else { + /* We don't have anything else to put here and for CDP + * with need something non-NULL */ + port->p_descr = strdup(hardware->h_ifname); } } else { if (portid_type != LLDP_PORTID_SUBTYPE_LOCAL) {