]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
notes on what to do for finishing the module
authorAlan T. DeKok <aland@freeradius.org>
Fri, 28 Jul 2017 16:53:46 +0000 (12:53 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 28 Jul 2017 16:53:46 +0000 (12:53 -0400)
src/modules/rlm_radius/TODO.md [new file with mode: 0644]
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_radius/rlm_radius_udp.c

diff --git a/src/modules/rlm_radius/TODO.md b/src/modules/rlm_radius/TODO.md
new file mode 100644 (file)
index 0000000..fba4d0f
--- /dev/null
@@ -0,0 +1,75 @@
+# rlm_radius
+
+## Multiple connections
+
+rlm_radius_udp.c now has one connection, in `c->active`, which is an
+`fr_dlist_t`.  That needs to be moved to a heap, ordered by (1)
+most-recently active (i.e. most recent sent packet that had a
+response), followed by (2) number of free IDs.
+
+When we need a connection, we pop it from the heap.  Allocate an ID,
+and push it back to the heap.
+
+When we get a reply, we grab the connection, check / update
+`last_sent_with_reply`, free the ID (unless it's Status-Server ping
+checks), and extract / insert the connection back into the heap.
+
+When the packet times out, we just free the ID (unless it's
+Status-Server ping checks), and extract / insert the connection back
+into the heap.
+
+We need to extract / insert because it's location may have changed...
+
+We *probably* want to keep one connection "full", if at all possible.
+i.e. the heap should prefer connections with *fewer* free IDs.
+... unless we're using extended ID, in which was we always pick an
+active connection.  i.e. one that's writable.
+
+The "full" connections should be on a *separate* heap, or maybe a
+`fr_dlist_t`.  The extract / insert connection work needs to be done
+in it's own function, because it's mostly magic, and needs to be done
+in multiple places.
+
+## Packet retransmission timers
+
+Via similar code to v3.  See references to "jitter" and "mrt / irt /
+mrc" in process.c in v3.
+
+## Connection status management
+
+Mark a connection live / dead / zombie based on packet retransmission
+timers.  Set / do Status-Server checks as necessary.
+
+
+## Type = Access-Request checking
+
+Which (if set) limits the outbound packet types mainly so that we can
+fail int the module instead of not getting a reply from the home
+server and it mirrors the old configuration.
+
+This also allows us to parse "Access-Request { ... }" sub-sections
+only if there's an Access-Request.  i.e. we only get the debug output
+for the various timers if they're needed.
+
+see `rlm_radius.h`, retransmission intervals are in:
+
+`rlm_radius_retry_t    packets[FR_MAX_PACKET_CODE];`
+
+## status_check = Status-Server
+
+add status_check = Status-Server or Access-Request, ala old code
+
+The main issue here is the ID allocation... If this is set, then we
+need to reserve one ID via `rr_track_alloc()` for the status-server
+check.  Then use that ID if there are no responses to packets.
+
+We should also allow `status_check = auto`, which picks it up from the
+list of allowed packet types.  We then need to require config for
+username / password, for Access-Request, and just username for
+Accounting-Request.
+
+## Replication (i.e. not proxying)
+
+allow for "no reply" proxying, where we don't care about getting the reply
+i.e. we still drain the socket, we just don't do anything with the replies
+
index 15a4fb9c9e8a3b8cfdc49b84d2bc933779ff1ab6..da8aa0a5cf19dfd4109c960abbc860ab1b63570c 100644 (file)
@@ -1,12 +1,3 @@
-// * add 'type = Access-Request' checking.  Which (if set) limits the outbound packet types
-//   - mainly so that we can fail here instead of not getting a reply from the home server
-//   - and it mirrors the old configuration
-//   - which allows us to parse "Access-Request { ... }" sub-sections only if there's an Access-Request
-// * add status_check = Status-Server or Access-Request, ala old code
-// * allow for "no reply" proxying, where we don't care about getting the reply
-//   - i.e. we still drain the socket, we just don't do anything with the replies
-// * allow for PCAP interfaces in proto_radius, so we can sniff the network and proxy RADIUS packets...
-
 /*
  *   This program is is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
index 088a9e170af99db2ad0c524ce0d8bebf17371f75..c07deea2049836e6f2321c4e848c82bdafa9e6c7 100644 (file)
@@ -1,10 +1,3 @@
-// @todo - allow for multiple connections
-// * connections have to be in a heap, sorted by most recently sent with reply, followed by # of free packets
-// * need to add zombie connections in a zombie list, so that "dead" ones aren't used for new packets
-// * need to check if a connection is zombie, and if so, move it to the zombie list
-// * add packet retransmission timers
-// * add status-server checks
-
 /*
  *   This program is is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by