lldp: announce shutdown with a TTL of 0

lldp off and port <n> lldp block went silent and left the neighbour
holding our entry until its TTL ran out, 120 s later. Send one LLDPDU
with a TTL of 0 on the ports that stop, the shutdown form 802.1AB
defines for this, before the transmit mask changes.
This commit is contained in:
d00f committed 2026-10-13 04:00:32 +02:00
1 parent 0e2d940765
commit 12b85025e3
3 files changed
+19 -4

No files matched your search

+4
View File
@@ -920,6 +920,8 @@ void parse_port(void)
print_string("\"\n");
} else if (cmd_compare(2, "lldp")) {
if (cmd_compare(3, "block")){
if (lldp_enabled)
lldp_shutdown((uint16_t)1 << phy_settings.port);
lldp_logical_port_status &= ~((uint16_t)1 << phy_settings.port);
} else if (cmd_compare(3, "permit")) {
lldp_logical_port_status |= (uint16_t)1 << phy_settings.port;
@@ -2046,6 +2048,8 @@ void cmd_parser(void) __banked
lldp_enabled = 1;
} else {
print_string("LLDP disabled\n");
if (lldp_enabled)
lldp_shutdown(lldp_logical_port_status);
lldp_enabled = 0;
}
}