Commit ae584eb1 authored by Alessandro Rubini's avatar Alessandro Rubini

rvlan: default to "godown" at init time, not just "down"

This renumbers FSM states so the default is "godown", that forces "auth_vlan"
on down ports. Otherwise, at boot time they remain in their previous
status (for my own wrs this was vlan 0).

Before:

   wrs# /tmp2/rvlan-status
   wri2 (001bc5090845 <-> ): state down, vlan 0, pid 0, fd -1
   [...]

After:

   wrs# /etc/init.d/radiusvlan.sh stop
   wrs# /etc/init.d/radiusvlan.sh start
   wrs# /tmp2/rvlan-status
   wri2 (001bc5090845 <-> ): state down, vlan 4090, pid 0, fd -1
   [...]
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 99361847
......@@ -58,23 +58,23 @@ struct rvlan_dev {
};
enum fsm_state {
RVLAN_DOWN = 0,
RVLAN_GODOWN = 0,
RVLAN_DOWN,
RVLAN_JUSTUP,
RVLAN_SNIFF,
RVLAN_AUTH,
RVLAN_CONFIG,
RVLAN_CONFIGURED,
RVLAN_GODOWN,
RVLAN_WAIT,
};
char *fsm_names[] = {
[RVLAN_GODOWN] = "godown",
[RVLAN_DOWN] = "down",
[RVLAN_JUSTUP] = "justup",
[RVLAN_SNIFF] = "sniff",
[RVLAN_AUTH] = "auth",
[RVLAN_CONFIG] = "config",
[RVLAN_CONFIGURED] = "configured",
[RVLAN_GODOWN] = "godown",
[RVLAN_WAIT] = "wait",
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment