Allowing commands like port 1 lldp block and port 2 lldp permit

so we are able to enable/disable lldp transmission on a specific
port.
This commit is contained in:
Rob Emery committed 2026-10-10 09:50:01 +01:00
1 parent cedc795b82
commit 4f1a2f04d8
3 files changed
+16 -3

No files matched your search

+9
View File
@@ -881,6 +881,7 @@ void parse_port(void)
cmd_error("\nUsage:" \
"\nport <port> [show|on|off]" \
"\nport <port> [10m|100m|1g|2g5|duplex] [half|full]" \
"\nport <port> lldp [block|permit]" \
"\nport <port> name [custom port name]\n");
return;
}
@@ -966,6 +967,14 @@ void parse_port(void)
else
phy_settings.duplex = PHY_DUPLEX_HALF;
phy_set_duplex();
} else if (cmd_compare(2, "lldp")) {
if (cmd_compare(3, "block")){
lldp_port_status &= ~(1 << phy_settings.port);
} else if (cmd_compare(3, "permit")) {
lldp_port_status |= 1 << phy_settings.port;
} else {
print_string ("Unknown port <port> lldp [block|permit] command\n");
}
} else {
cmd_error("Unknown port command\n");
}