mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Merge pull request #586 from mintsoft/lldp-blocking
LLDP: prevent the switch from passing LLDPDUs when lldp is enabled
This commit is contained in:
2 files changed
+4
No files matched your search
@@ -18,6 +18,7 @@
|
|||||||
#include "rtl837x_bandwidth.h"
|
#include "rtl837x_bandwidth.h"
|
||||||
#include "rtl837x_lldp.h"
|
#include "rtl837x_lldp.h"
|
||||||
#include "rtl837x_storm.h"
|
#include "rtl837x_storm.h"
|
||||||
|
#include "rtl837x_trap.h"
|
||||||
#include "sfp.h"
|
#include "sfp.h"
|
||||||
#include "dhcp.h"
|
#include "dhcp.h"
|
||||||
#include "syslog.h"
|
#include "syslog.h"
|
||||||
@@ -2044,9 +2045,11 @@ void cmd_parser(void) __banked
|
|||||||
if (cmd_compare(1, "on")) {
|
if (cmd_compare(1, "on")) {
|
||||||
print_string("LLDP enabled\n");
|
print_string("LLDP enabled\n");
|
||||||
lldp_enabled = 1;
|
lldp_enabled = 1;
|
||||||
|
trap_rma_set(RTL837X_RMA0E_CONF, RTL837X_RMA_ACT_TRAP);
|
||||||
} else {
|
} else {
|
||||||
print_string("LLDP disabled\n");
|
print_string("LLDP disabled\n");
|
||||||
lldp_enabled = 0;
|
lldp_enabled = 0;
|
||||||
|
trap_rma_set(RTL837X_RMA0E_CONF, RTL837X_RMA_ACT_FORWARD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -285,6 +285,7 @@
|
|||||||
*/
|
*/
|
||||||
#define RTL8373_RLDP_TIMER 0x1074
|
#define RTL8373_RLDP_TIMER 0x1074
|
||||||
#define RTL837X_RMA0_CONF 0x4ecc
|
#define RTL837X_RMA0_CONF 0x4ecc
|
||||||
|
#define RTL837X_RMA0E_CONF 0x4ee8
|
||||||
#define RTL837X_RMA2_CONF 0x4ed4
|
#define RTL837X_RMA2_CONF 0x4ed4
|
||||||
#define RTL837X_RMA_ACT_MASK 0x30
|
#define RTL837X_RMA_ACT_MASK 0x30
|
||||||
#define RTL837X_RMA_ACT_FORWARD 0x00
|
#define RTL837X_RMA_ACT_FORWARD 0x00
|
||||||
|
|||||||
Reference in new issue
Block a user