]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add more notes on TODO's
authorAlan T. DeKok <aland@freeradius.org>
Sun, 30 Jul 2017 14:58:29 +0000 (10:58 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 30 Jul 2017 14:58:29 +0000 (10:58 -0400)
src/modules/rlm_radius/TODO.md
src/modules/rlm_radius/rlm_radius_udp.c

index fa39a919284c08d9a1cc28ef7bf853db9ea95e52..35783daf969e7b72081eba52c92da2ac37fafbb2 100644 (file)
@@ -1,5 +1,11 @@
 # rlm_radius
 
+## RADIUS fixups
+
+It has to add Proxy-State to outbound packets (oops)
+
+And do CHAP-Challenge fixups
+
 ## Multiple connections
 
 rlm_radius_udp.c now has one connection, in `c->active`, which is an
@@ -56,6 +62,12 @@ We need some more configuration options:
        connect_timeout
        reconnect_delay
        idle_timeout
+
+       # as per 3.0
+       response_window
+       response_timeouts
+       zombie_period
+       revive_interval
     }
     
     # return RLM_MODULE_USERLOCK if we're sitting on too many packets
@@ -80,12 +92,6 @@ We need some more configuration options:
                User-Name = ...
                User-Password = ...
        }
-       
-       # as per 3.0
-       response_window
-       response_timeouts
-       zombie_period
-       revive_interval
     }
 
 The `rlm_radius` module should not have an idea as to the status of
@@ -123,3 +129,26 @@ list of allowed packet types.  We then need to require config for
 username / password, for Access-Request, and just username for
 Accounting-Request.
 
+## synchronous proxying
+
+ala v3.  All retransmissions started by the client.
+
+This requires a "signal" handler to be added when the module calls unlang_yield.
+
+The call to the signal handler is already in proto_radius_auth and friends.
+
+We could probably add a signal handler to the module, to handle the
+DONE signal.  This would allow graceful cleanups.  Those are mostly
+already handled via the talloc_free() hierarchy and destructors. But
+it may be nice to distinguish the situations.  And, it lets us test
+the signal handler independent of anything else.
+
+Doing synchronous proxying also mean having the network side return
+DUP PACKET (somehow).  And, send that dup packet signal to the worker.
+Which somehow associates it with a request (probably via a simple
+network thread + packet identifier).  This means that the worker has
+to have yet another tree tracking packets... but it will allow for
+signaling if necessary.
+
+We probaby want the network + worker to be able to send IDs of 0/0,
+which means "no tracking", as that will likely be the common case.
index 22d90b812f37a8e5a9000f1869da5e0311cc69eb..30fed9dbfab258f1ac5f3fcf69f5b335e573fa3d 100644 (file)
@@ -359,6 +359,11 @@ static void conn_writable(fr_event_list_t *el, int fd, UNUSED int flags, void *u
                        return;
                }
 
+               /*
+                *      @todo - print out the packet we're proxying,
+                *      including socket name.
+                */
+
                MEM(u->packet = talloc_memdup(u, c->buffer, packet_len));
                u->packet_len = packet_len;
 
@@ -758,6 +763,25 @@ static int mod_push(void *instance, REQUEST *request, rlm_radius_link_t *link, v
         *
         *      conn_writable() will set c->pending, and call
         *      fd_active() as necessary.
+        *
+        *      @todo - if there's an error, and we call
+        *      mod_finished_request(), it will call
+        *      unlang_resumable().  This marks it as resumable BEFORE
+        *      rlm_radius calls unlang_yield.  Oops...
+        *
+        *      We need to update the push() API to return
+        *      -1 error
+        *      0  should yield
+        *      1  written immediately
+        *
+        *      and add an rlm_rcode_t* pointer, so that we can return
+        *      it here.
+        *
+        *      This also means splitting conn_writable() into two
+        *      parts.  One, a loop around the queues.  And two, a
+        *      function that does the actual write.  We can then call
+        *      the write function from here, and have it return an
+        *      OK/yield return code.
         */
        if (!c->pending) {
                conn_writable(t->el, c->fd, 0, c);