X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=shell_vlan.c;h=661eb3d77c6143d16d5d5cac5099f636e6d66546;hb=2531679f54aac584bdcc922d7727600845ecb23b;hp=80dfcb102254c3e27e2043b1c266d1026a7321f8;hpb=11ae7c1958d87f75fb840c6556fa99abf85e6607;p=gsconf diff --git a/shell_vlan.c b/shell_vlan.c index 80dfcb1..661eb3d 100644 --- a/shell_vlan.c +++ b/shell_vlan.c @@ -5,7 +5,7 @@ void shell_vlan(char ** argv, int elem) { int n, m, o; if (elem == 1) { - + printf(" vlan [show|enable|show|add|del|assign|revoke] \n"); return; } @@ -100,13 +100,13 @@ void shell_vlan(char ** argv, int elem) { printf("Invalid Port ID\n"); return; } - + o = m; m = (0x80 >> ((m & 0xFF) - 1)) | (int)vl->members; - + printf("%i %i\n", (int)vl->tag, (unsigned int)(~((unsigned char)m))); if (strncmp(argv[4], "T", 1) == 0) { - o = (int)vl->tag | m; + o = (int)vl->tag | (0x80 >> ((o & 0xFF) - 1)); }else if (strncmp(argv[4], "U", 1) == 0) { - o = (int)vl->tag &(~((char)m)); + o = (int)vl->tag &(~((0x80 >> ((o & 0xFF) - 1)))); } password(); printError(gs105e_setVlanMembers(n, m, o));