From: Vincent Bernat Date: Thu, 20 Sep 2012 14:37:22 +0000 (+0200) Subject: display: fix display of various Dot3 advertised links X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5883b651a94a96d4d5529589755cec595ba29de2;p=thirdparty%2Flldpd.git display: fix display of various Dot3 advertised links --- diff --git a/src/display.c b/src/display.c index 97f26332..9398f779 100644 --- a/src/display.c +++ b/src/display.c @@ -889,8 +889,10 @@ display_autoneg(struct writer * w, struct lldpd_port *port, int bithd, int bitfd tag_start(w, "advertised", "Adv"); tag_attr(w, "type", "", desc); - tag_attr(w, "hd", "HD", (port->p_macphy.autoneg_advertised & bithd)?"yes":"no"); - tag_attr(w, "fd", "FD", (port->p_macphy.autoneg_advertised)?"yes":"no"); + if (bitfd != bithd) { + tag_attr(w, "hd", "HD", (port->p_macphy.autoneg_advertised & bithd)?"yes":"no"); + tag_attr(w, "fd", "FD", (port->p_macphy.autoneg_advertised & bitfd)?"yes":"no"); + } tag_end (w); } #endif @@ -958,13 +960,16 @@ display_port(struct writer * w, struct lldpd_port *port) "10Base-T"); display_autoneg(w, port, LLDP_DOT3_LINK_AUTONEG_100BASE_TX, LLDP_DOT3_LINK_AUTONEG_100BASE_TXFD, - "100Base-T"); + "100Base-TX"); display_autoneg(w, port, LLDP_DOT3_LINK_AUTONEG_100BASE_T2, LLDP_DOT3_LINK_AUTONEG_100BASE_T2FD, "100Base-T2"); + display_autoneg(w, port, LLDP_DOT3_LINK_AUTONEG_100BASE_T4, + LLDP_DOT3_LINK_AUTONEG_100BASE_T4, + "100Base-T4"); display_autoneg(w, port, LLDP_DOT3_LINK_AUTONEG_1000BASE_X, LLDP_DOT3_LINK_AUTONEG_1000BASE_XFD, - "100Base-X"); + "1000Base-X"); display_autoneg(w, port, LLDP_DOT3_LINK_AUTONEG_1000BASE_T, LLDP_DOT3_LINK_AUTONEG_1000BASE_TFD, "1000Base-T");