mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Using PVID=0 for the situation where the port is only in tagged
membership. This was tested on HI_K0801WS and it appears to not have any negative side-effects
This commit is contained in:
1 parent
834403b97b
commit
c46261e052
2 files changed
+3
-4
No files matched your search
+2
-2
@@ -2011,10 +2011,10 @@ void cmd_parser(void) __banked
|
||||
cmd_error("lacp (show | off); a group starts LACP with: lag <1-4> lacp <port>...\n");
|
||||
} else if (cmd_compare(0, "pvid")) {
|
||||
if (cmd_words_len == 3 && cmd_parse_port_separator(cmd_words_b[1]) != 0
|
||||
&& atoi_short(cmd_words_b[2]) && atoi_results_short && atoi_results_short <= 4094)
|
||||
&& atoi_short(cmd_words_b[2]) && atoi_results_short <= 4094)
|
||||
port_pvid_set(atoi_results_u8, atoi_results_short);
|
||||
else {
|
||||
cmd_error("pvid <port> <1-4094>\n");
|
||||
cmd_error("pvid <port> <0-4094>\n");
|
||||
}
|
||||
} else if (cmd_compare(0, "vlan")) {
|
||||
parse_vlan();
|
||||
|
||||
+1
-2
@@ -1619,7 +1619,6 @@ function vlan2str(i, n, t, u) {
|
||||
function pvidcmd(i, p){
|
||||
return "pvid " + p + " " + i;
|
||||
}
|
||||
const parkingVLAN=4094;
|
||||
function mySplit(a){
|
||||
if(a.trim()=="") return [];
|
||||
return a.trim().split(",");
|
||||
@@ -1674,7 +1673,7 @@ function vlanApply() {
|
||||
//park all ports with only tagged membership
|
||||
for (p in vlansPerPort){
|
||||
if (vlansPerPort[p].u.length == 0 && vlansPerPort[p].t.length > 0) {
|
||||
tail_cmds.push(pvidcmd(parkingVLAN, p));
|
||||
tail_cmds.push(pvidcmd(0, p));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user