mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-11-01 18:04:12 +08:00
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:
1 parent
0e2d940765
commit
12b85025e3
3 files changed
+19
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user