Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
cdd79c66
Commit
cdd79c66
authored
Oct 09, 2020
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/tools/radiusvlan: actually call wrs_vlans command
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
6354948e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
radiusvlan.c
userspace/tools/radiusvlan.c
+14
-3
No files found.
userspace/tools/radiusvlan.c
View file @
cdd79c66
...
...
@@ -87,6 +87,7 @@ int rvlan_fsm(struct rvlan_dev *dev, fd_set *rdset)
struct
sockaddr_in
from
;
socklen_t
fromlen
=
sizeof
(
from
);
static
unsigned
char
frame
[
512
];
static
char
cmdstr
[
128
];
int
pipe0
[
2
],
pipe1
[
2
];
/* First of all, process up/down changes */
...
...
@@ -309,11 +310,21 @@ int rvlan_fsm(struct rvlan_dev *dev, fd_set *rdset)
break
;
case
RVLAN_CONFIG
:
/*
* I expected to call wrsw_vlans here, but some parameters
* are global, so we must do that outside of this
* Call wrsw_vlans here. Still, port lists are
* global so request an outer action with the
* change_pending flag.
*/
rvlan_change_pending
++
;
sprintf
(
cmdstr
,
"wrs_vlans --port %i --pvid %i > /dev/null "
"2> /dev/null"
,
dev
->
portnr
,
dev
->
chosen_vlan
);
if
(
system
(
cmdstr
))
{
fprintf
(
stderr
,
"%s: can't set vlan %i for %i (%s)
\n
"
,
prgname
,
dev
->
chosen_vlan
,
dev
->
portnr
,
dev
->
name
);
return
-
1
;
}
dev
->
fsm_state
=
RVLAN_CONFIGURED
;
rvlan_change_pending
++
;
break
;
case
RVLAN_CONFIGURED
:
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment