Commit 8df3687c authored by Alessandro Rubini's avatar Alessandro Rubini

rvlan: bugfix: do not obey dotconfig if authorization is denied

The radius server, when denying authorization, may reply as follows:

   Received response ID 79, code 3, length = 44
       Tunnel-Type:0 = 13
       Tunnel-Medium-Type:0 = IEEE-802
       Framed-Protocol = PPP
       Service-Type = Framed-User

i.e., it misses the vlan number as "Tunnel-Private-Group-Id", while
everything else is in place. In this case we should not obey
dotconfig, but rather keep the noauth_vlan.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent e45473a3
......@@ -318,7 +318,7 @@ int rvlan_fsm(struct rvlan_dev *dev, fd_set *rdset)
s = strchr(s, '"');
if (s)
sscanf(s+1, "%i", &dev->chosen_vlan);
if (rvlan_obey_dotconfig )
if (s && rvlan_obey_dotconfig)
dev->chosen_vlan = dev->dotconfig_vlan;
}
if (verbose)
......
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