- 14 Oct, 2020 3 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 12 Oct, 2020 4 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
rvlan: bugfix: wrs_vlans is not in /home/rubini/bin:/home/rubini/bin/i386:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/X11:/usr/TeX/bin at boot Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 11 Oct, 2020 3 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
In sh, string comparison for equality is "=", not "==". Bash accepts either operator but suggests to use "=" for posix conformance. Our /bin/sh is currently busybox, which accepts "==" like bash, but if you use ash or dash it fails: $ CONFIG_FOO=y $ if [ "$CONFIG_FOO" = "y" ]; then echo ok; fi ok $ if [ "$CONFIG_FOO" == "y" ]; then echo ok; fi dash: 3: [: y: unexpected operator Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
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 <rubini@gnudd.com>
-
- 09 Oct, 2020 30 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
also, the mac address is always saved in dev->mac, so we get it in rvlan-status also for "down" interfaces. Example: wri12 (001bc509084f <-> ): state down, vlan 0, pid 0, fd -1 wri13 (001bc5090850 <-> ): state down, vlan 0, pid 0, fd -1 wri14 (001bc5090851 <-> ): state down, vlan 0, pid 0, fd -1 Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This simply sends SIGUSR1 to radiusvlan and sorts the output file. Example: wri2 (001bc5090845 <-> 001bc509007d): state configured, vlan 4094, pid 0, fd -1 wri3 (001bc5090846 <-> 00e04c1bfd8d): state configured, vlan 31, pid 0, fd -1 wri4 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri5 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri6 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri7 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri8 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri9 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri10 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri11 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri12 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri13 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri14 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri15 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri16 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri17 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 wri18 (000000000000 <-> ): state down, vlan 0, pid 0, fd -1 Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The user can now send SIGUSR1 to get a snapshot of the current status, and SIGUSR2 to force reauthentication of all ports (without getting through stop/start). Please note that during reauth we do not configure ports to the auth_vlan network: they would just continue to live on their current VLAN while the radius server is queried. For those ports where nothing changed, no service interruption happens. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The problem is exposed when we force all intefaces to "justup", in a later commit. Some interfaces will have no children to wait for and would spit this: radiusvlan: wait(0): No child processes Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
When we get one of the very-unlikely errors, we should countinue to the next interface rather than return to the caller. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The problem with /sys/net/*/carrier, is that the file may be missing. For example, if the fiber is unplugged. "operstate" is always there, and it is either "up" or "down". If it is ifconfig'd up but without fiber, the operstate is properly down, so we can use it with no further ado. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We may use the return value later to see if the server is unresponsive, and pick another one. Anyways this is cleaner, kill() was a hack. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Now that the state machine is known to work, we'd better only report state changes. So this is the new output for the whole cycle when a fiber is plugged (including kernel messages on the console): wri3: Link up, lpa 0x41a0. device wri3 entered promiscuous mode FSM: wri3: down -> sniff device wri3 left promiscuous mode recvfrom(wri3): 0800-90e2ba456c6b FSM: wri3: sniff -> auth dev wri3, got 55 bytes so far dev wri3: vlan 31 FSM: wri3: auth -> config FSM: wri3: config -> configured While this is a port already up twhen the tool starts, in an ssh run: FSM: wri17: justup -> sniff recvfrom(wri17): 88f7-00267b0003d4 FSM: wri17: sniff -> auth dev wri17, got 185 bytes so far dev wri17: vlan 31 FSM: wri17: auth -> config FSM: wri17: config -> configured Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit fixes errors in pipe closing, and changes the parsing. NOTE: it also changes the identification of "self" frames. ppsi sends everything using the eth0 mac address, which is different from the wriXX port. This is hacked now by checking the first 5 bytes, but it must be fixed for real. Finally, I save both stdin and stdout that I exchange with radclient into tmp, so we can check what happened during tests. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We'd better not daemonize, so we can use the init.d scripts of hald and other wr tools, with syslog support. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The full set of /etc/raddb/dictionary* is overkill, we only need a few symbols from these three files, if we run radclient. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-