]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
4 years agominor word smithing
Alan T. DeKok [Sat, 7 Aug 2021 16:12:36 +0000 (12:12 -0400)] 
minor word smithing

4 years agodon't unlock the mutex if it was never locked.
Alan T. DeKok [Fri, 6 Aug 2021 16:38:34 +0000 (12:38 -0400)] 
don't unlock the mutex if it was never locked.

4 years agonote recent changes
Alan T. DeKok [Fri, 6 Aug 2021 13:44:19 +0000 (09:44 -0400)] 
note recent changes

4 years agoallocate from the request, which is thread-safe. Helps with #3188
Alan T. DeKok [Thu, 5 Aug 2021 15:22:12 +0000 (11:22 -0400)] 
allocate from the request, which is thread-safe.  Helps with #3188

The "check" item is taken from the "huntgroups" file.  It's in
a statically allocated list which doesn't change, and shouldn't
change during run-time.  Allocating memory in its context is
not thread-safe, and can cause issues

4 years agosimple config for testing
Alan T. DeKok [Thu, 5 Aug 2021 14:17:22 +0000 (10:17 -0400)] 
simple config for testing

4 years agoStatus-Server packets are left in the TCP proxy hash
Alan T. DeKok [Wed, 4 Aug 2021 23:05:10 +0000 (19:05 -0400)] 
Status-Server packets are left in the TCP proxy hash

until such time as the listener is being shut down

4 years agoallow status-server checks for TCP
Alan T. DeKok [Wed, 4 Aug 2021 22:59:20 +0000 (18:59 -0400)] 
allow status-server checks for TCP

nothing yet implements that, but it's a start.

We still have to allocate a permanent ID for status-server checks

4 years agowe cache preg only for PCRE
Alan T. DeKok [Wed, 4 Aug 2021 12:25:31 +0000 (08:25 -0400)] 
we cache preg only for PCRE

4 years agomore assertions
Alan T. DeKok [Wed, 4 Aug 2021 12:26:38 +0000 (08:26 -0400)] 
more assertions

4 years agoMySQL sqlippool SP: Run as invoker, not definer; close transaction on error (#4170)
Terry Burton [Tue, 3 Aug 2021 21:17:04 +0000 (22:17 +0100)] 
MySQL sqlippool SP: Run as invoker, not definer; close transaction on error (#4170)

In MariaDB/MySQL, stored procedures default to running in the context of
the definer rather than the invoker.

This is a problem in a streaming replication scenario since the definer
is often the root user who has the "super" power to write to a read-only
database (unless super-read-only is enabled, which is not available for
MariaDB), thus breaking the replication timeline.

Additionally, exiting an SP does not finalise any running transaction.
If an exception is raised within the SP (e.g. due to the database being
read-only) we must handle this and finalise the transaction, otherwise
subsequent calls to "SET TRANSACTION ISOLATION LEVEL READ COMMITTED"
will fail ad nauseam until the connection is finally closed.

4 years agodon't build coa tunnel by default
Alan T. DeKok [Tue, 3 Aug 2021 18:42:15 +0000 (14:42 -0400)] 
don't build coa tunnel by default

4 years agoproxy_listener may not exist
Alan T. DeKok [Tue, 3 Aug 2021 18:41:18 +0000 (14:41 -0400)] 
proxy_listener may not exist

4 years agoprint out better errors
Alan T. DeKok [Tue, 3 Aug 2021 17:24:25 +0000 (13:24 -0400)] 
print out better errors

4 years agoreturn type is ssize_t if we return -1
Alan T. DeKok [Tue, 3 Aug 2021 17:16:04 +0000 (13:16 -0400)] 
return type is ssize_t if we return -1

4 years agosimple test haproxy configuration file
Alan T. DeKok [Mon, 2 Aug 2021 12:19:18 +0000 (08:19 -0400)] 
simple test haproxy configuration file

4 years agodocument proxy_protocol
Alan T. DeKok [Fri, 30 Jul 2021 13:58:41 +0000 (09:58 -0400)] 
document proxy_protocol

4 years agoprint ip, not fr_ipaddr_t
Alan T. DeKok [Fri, 30 Jul 2021 13:24:18 +0000 (09:24 -0400)] 
print ip, not fr_ipaddr_t

4 years agothe end client must be known, too.
Alan T. DeKok [Fri, 30 Jul 2021 13:07:01 +0000 (09:07 -0400)] 
the end client must be known, too.

4 years agoreturn 1 for "done" instead of "error"
Alan T. DeKok [Thu, 29 Jul 2021 21:41:12 +0000 (17:41 -0400)] 
return 1 for "done" instead of "error"

4 years agoDump raw data
Alan T. DeKok [Thu, 29 Jul 2021 21:40:36 +0000 (17:40 -0400)] 
Dump raw data

4 years agofix misplaced bracket
Alan T. DeKok [Thu, 29 Jul 2021 21:37:44 +0000 (17:37 -0400)] 
fix misplaced bracket

4 years agoprint out things before mangling them
Alan T. DeKok [Thu, 29 Jul 2021 21:37:15 +0000 (17:37 -0400)] 
print out things before mangling them

4 years agorework connection management. Fixes #4163
Alan T. DeKok [Thu, 29 Jul 2021 19:03:52 +0000 (15:03 -0400)] 
rework connection management.  Fixes #4163

4 years agodon't read from the socket twice in a row, that's blocking
Alan T. DeKok [Thu, 29 Jul 2021 18:10:33 +0000 (14:10 -0400)] 
don't read from the socket twice in a row, that's blocking

4 years agospaces are allowed...
Alan T. DeKok [Thu, 29 Jul 2021 17:55:58 +0000 (13:55 -0400)] 
spaces are allowed...

4 years agoset extra=0 only when min=max.
Alan T. DeKok [Thu, 29 Jul 2021 13:54:16 +0000 (09:54 -0400)] 
set extra=0 only when min=max.

4 years agoformatting, so we don't have nested "else" when they're not needed
Alan T. DeKok [Thu, 29 Jul 2021 11:22:57 +0000 (07:22 -0400)] 
formatting, so we don't have nested "else" when they're not needed

4 years agoformatting
Alan T. DeKok [Thu, 29 Jul 2021 10:58:15 +0000 (06:58 -0400)] 
formatting

4 years agoFix typo in SQL ippool query (#4156)
Jorge Pereira [Thu, 29 Jul 2021 11:19:53 +0000 (08:19 -0300)] 
Fix typo in SQL ippool query (#4156)

4 years agoFix unnecessary periodic close/open in connection pools. refs #4161 (#4162)
Masamichi Hosoda [Thu, 29 Jul 2021 10:57:35 +0000 (19:57 +0900)] 
Fix unnecessary periodic close/open in connection pools. refs #4161 (#4162)

4 years agoFix another typo in SQL ippool queries.conf (#4158)
Jorge Pereira [Thu, 29 Jul 2021 10:56:38 +0000 (07:56 -0300)] 
Fix another typo in SQL ippool queries.conf (#4158)

4 years agoFix ippool mysql schema.sql (#4157)
Jorge Pereira [Thu, 29 Jul 2021 10:56:18 +0000 (07:56 -0300)] 
Fix ippool mysql schema.sql (#4157)

It must create even if already exists

4 years agoFix DHCP common policy (#4159)
Jorge Pereira [Thu, 29 Jul 2021 04:01:42 +0000 (01:01 -0300)] 
Fix DHCP common policy (#4159)

4 years agorearrange for simplicity
Alan T. DeKok [Wed, 28 Jul 2021 23:39:01 +0000 (19:39 -0400)] 
rearrange for simplicity

4 years agoFix ippool 'skip_locked' variable set (#4153)
Jorge Pereira [Wed, 28 Jul 2021 19:14:49 +0000 (16:14 -0300)] 
Fix ippool 'skip_locked' variable set (#4153)

If not in use, it must be declared just to make the parser happy.

4 years agoFix typo in MySQL/ippool queries.conf (#4152)
Jorge Pereira [Wed, 28 Jul 2021 13:52:43 +0000 (10:52 -0300)] 
Fix typo in MySQL/ippool queries.conf (#4152)

4 years agoFix raddb SQL config path (#4151)
Jorge Pereira [Wed, 28 Jul 2021 13:51:09 +0000 (10:51 -0300)] 
Fix raddb SQL config path (#4151)

4 years agolet's scan the newly read data, too
Alan T. DeKok [Wed, 28 Jul 2021 11:33:20 +0000 (07:33 -0400)] 
let's scan the newly read data, too

4 years agoclear prev, too?
Alan T. DeKok [Wed, 28 Jul 2021 11:21:13 +0000 (07:21 -0400)] 
clear prev, too?

4 years agoparse PROXY line.
Alan T. DeKok [Tue, 27 Jul 2021 13:58:26 +0000 (09:58 -0400)] 
parse PROXY line.

This should work.  Testing?  Meh.  That's for later

4 years agowe support PROXY protocol only for TLS
Alan T. DeKok [Tue, 27 Jul 2021 12:40:44 +0000 (08:40 -0400)] 
we support PROXY protocol only for TLS

4 years agostart of proxy_protocol support
Alan T. DeKok [Tue, 27 Jul 2021 12:00:49 +0000 (08:00 -0400)] 
start of proxy_protocol support

it doesn't yet parse the full "PROXY ..." string, but the basics
are there

4 years agominor updates to messages
Alan T. DeKok [Tue, 27 Jul 2021 11:13:16 +0000 (07:13 -0400)] 
minor updates to messages

4 years agocleanups and fixes
Alan T. DeKok [Mon, 26 Jul 2021 14:44:12 +0000 (10:44 -0400)] 
cleanups and fixes

4 years agolet's build without TLS, too
Alan T. DeKok [Sun, 25 Jul 2021 21:03:51 +0000 (17:03 -0400)] 
let's build without TLS, too

4 years agorename
Alan T. DeKok [Sun, 25 Jul 2021 19:46:43 +0000 (15:46 -0400)] 
rename

4 years agodo SNI on the server side.
Alan T. DeKok [Sun, 25 Jul 2021 19:30:40 +0000 (15:30 -0400)] 
do SNI on the server side.

And cache the name in TLS-Server-Name-Indication

4 years agotypos
Alan T. DeKok [Sun, 25 Jul 2021 16:45:10 +0000 (12:45 -0400)] 
typos

4 years agonote recent changes
Alan T. DeKok [Sun, 25 Jul 2021 16:38:05 +0000 (12:38 -0400)] 
note recent changes

4 years agomove SNI to the correct place
Alan T. DeKok [Sun, 25 Jul 2021 16:35:35 +0000 (12:35 -0400)] 
move SNI to the correct place

4 years agoupdate numbers
Alan T. DeKok [Sun, 25 Jul 2021 16:31:19 +0000 (12:31 -0400)] 
update numbers

4 years agoselect SSL_CTX based on realm, if hash table exists
Alan T. DeKok [Sun, 25 Jul 2021 13:49:21 +0000 (09:49 -0400)] 
select SSL_CTX based on realm, if hash table exists

4 years agoadd Server Name Indication (SNI) to outbound RadSec connections
Alan T. DeKok [Sun, 25 Jul 2021 13:31:57 +0000 (09:31 -0400)] 
add Server Name Indication (SNI) to outbound RadSec connections

to simplify TLS load balancing

4 years agodocs
Alan T. DeKok [Sun, 25 Jul 2021 13:10:35 +0000 (09:10 -0400)] 
docs

note that right now we can statically load the certs, but not yet
dynamically choose them from the hash table

4 years agoadd "realm_dir" configuration
Alan T. DeKok [Sun, 25 Jul 2021 12:19:45 +0000 (08:19 -0400)] 
add "realm_dir" configuration

which will allow for loading multiple certificates from
a subdirectory, and choosing from them at run time

4 years agoadd chain_file and private_key_file to tls_ctx_init()
Alan T. DeKok [Sun, 25 Jul 2021 12:13:14 +0000 (08:13 -0400)] 
add chain_file and private_key_file to tls_ctx_init()

in preparation for adding realm_dir to the server configuration

4 years agorequire OpenSSL 1.1.0 or greater for reject_unknown_intermediate_ca
Alan T. DeKok [Fri, 23 Jul 2021 15:02:44 +0000 (11:02 -0400)] 
require OpenSSL 1.1.0 or greater for reject_unknown_intermediate_ca

4 years agojust use cert-file, and not chain file
Alan T. DeKok [Thu, 22 Jul 2021 22:06:55 +0000 (18:06 -0400)] 
just use cert-file, and not chain file

4 years agoadd dictionary attributes, and allow for chain file
Alan T. DeKok [Thu, 22 Jul 2021 21:54:49 +0000 (17:54 -0400)] 
add dictionary attributes, and allow for chain file

4 years agoallow TLS-Session-Cert-File to be set
Alan T. DeKok [Thu, 22 Jul 2021 21:04:58 +0000 (17:04 -0400)] 
allow TLS-Session-Cert-File to be set

4 years agobetter errors
Alan T. DeKok [Thu, 22 Jul 2021 20:59:49 +0000 (16:59 -0400)] 
better errors

4 years agoclose connection on "no TLS data, but connection isn't set up"
Alan T. DeKok [Wed, 7 Apr 2021 17:11:33 +0000 (13:11 -0400)] 
close connection on "no TLS data, but connection isn't set up"

4 years agoadd %{listen:Originating-Realm-Key}
Alan T. DeKok [Wed, 7 Apr 2021 17:04:49 +0000 (13:04 -0400)] 
add %{listen:Originating-Realm-Key}

4 years agoallow multiple Proxy-To-Originating-Realm keys
Alan T. DeKok [Tue, 6 Apr 2021 13:05:56 +0000 (09:05 -0400)] 
allow multiple Proxy-To-Originating-Realm keys

in which case it proxies to the first one it can, NOT to all
of them.

This loop allows for a reverse *proxy* to say "any of these N
keys can return CoA packets to ream FOO".

4 years agonotes on Status-Server when we bring up a TLS connection
Alan T. DeKok [Tue, 6 Apr 2021 12:58:25 +0000 (08:58 -0400)] 
notes on Status-Server when we bring up a TLS connection

4 years agoregularize TLS messages
Alan T. DeKok [Tue, 6 Apr 2021 12:46:47 +0000 (08:46 -0400)] 
regularize TLS messages

4 years agodeclare 'key' as const, which avoids a weird memcpy
Alan T. DeKok [Tue, 6 Apr 2021 12:35:02 +0000 (08:35 -0400)] 
declare 'key' as const, which avoids a weird memcpy

4 years agohoist reverse_coa checks before _all_ "remove from proxy hash" calls
Alan T. DeKok [Tue, 6 Apr 2021 12:31:25 +0000 (08:31 -0400)] 
hoist reverse_coa checks before _all_ "remove from proxy hash" calls

4 years agofix radsec tests
Vadim Cargatser [Tue, 6 Apr 2021 11:58:15 +0000 (14:58 +0300)] 
fix radsec tests

4 years agoshut down coa tunnel listener after cleaning up proxied packets
Alan T. DeKok [Mon, 5 Apr 2021 13:18:48 +0000 (09:18 -0400)] 
shut down coa tunnel listener after cleaning up proxied packets

4 years agograb another coa tunnel listener if this one is full
Alan T. DeKok [Mon, 5 Apr 2021 13:15:21 +0000 (09:15 -0400)] 
grab another coa tunnel listener if this one is full

which bypasses the normal logic of proxy_new_listener(), etc.

4 years agofixes from Vadim
Alan T. DeKok [Mon, 5 Apr 2021 13:09:50 +0000 (09:09 -0400)] 
fixes from Vadim

request->proxy_listener is NULL after removing it from the proxy
hash, so cache the reverse_coa status.

4 years agotypo fixes from Vadim
Alan T. DeKok [Mon, 5 Apr 2021 13:06:17 +0000 (09:06 -0400)] 
typo fixes from Vadim

4 years agoonly initialize the mutex if we succeed on insert
Alan T. DeKok [Sat, 3 Apr 2021 13:21:15 +0000 (09:21 -0400)] 
only initialize the mutex if we succeed on insert

on the off chance that pthread_mutex_init() allocates memory

4 years agotypo
Alan T. DeKok [Sat, 3 Apr 2021 12:13:33 +0000 (08:13 -0400)] 
typo

4 years agoretry on insert failure, due to mutex issues
Alan T. DeKok [Sat, 3 Apr 2021 12:06:10 +0000 (08:06 -0400)] 
retry on insert failure, due to mutex issues

4 years agofor non-proxy sockets, run CoA / Disconnect through recv_coa_server
Alan T. DeKok [Fri, 2 Apr 2021 19:34:55 +0000 (15:34 -0400)] 
for non-proxy sockets, run CoA / Disconnect through recv_coa_server

which is the CoA server used to send CoA requests to the NAS, but
whatever.  It's copied from the virtual server in the listener,
and is NOT the same as home->virtual_server

4 years agocheck for Proxy-To-Originating-Realm, too
Alan T. DeKok [Fri, 2 Apr 2021 19:27:48 +0000 (15:27 -0400)] 
check for Proxy-To-Originating-Realm, too

4 years agouse better names for home->virtual_server
Alan T. DeKok [Fri, 2 Apr 2021 19:26:21 +0000 (15:26 -0400)] 
use better names for home->virtual_server

and set home->recv_coa_server, too?

4 years agouse better names for CoA home server / pool
Alan T. DeKok [Fri, 2 Apr 2021 19:20:22 +0000 (15:20 -0400)] 
use better names for CoA home server / pool

4 years agouse better names
Alan T. DeKok [Fri, 2 Apr 2021 19:18:06 +0000 (15:18 -0400)] 
use better names

4 years agomark up this listener as doing reverse CoA, too
Alan T. DeKok [Fri, 2 Apr 2021 12:52:05 +0000 (08:52 -0400)] 
mark up this listener as doing reverse CoA, too

4 years agofix typos from Vadim
Alan T. DeKok [Fri, 2 Apr 2021 12:51:50 +0000 (08:51 -0400)] 
fix typos from Vadim

4 years agoskip listeners where all IDs are used
Alan T. DeKok [Thu, 1 Apr 2021 20:37:24 +0000 (16:37 -0400)] 
skip listeners where all IDs are used

4 years agoshut up compiler
Alan T. DeKok [Thu, 1 Apr 2021 20:36:20 +0000 (16:36 -0400)] 
shut up compiler

4 years agomove calls to listen_coa_free() so that we don't break things
Alan T. DeKok [Thu, 1 Apr 2021 20:11:42 +0000 (16:11 -0400)] 
move calls to listen_coa_free() so that we don't break things

4 years agotests for radsec
Vadim Cargatser [Thu, 1 Apr 2021 20:04:11 +0000 (16:04 -0400)] 
tests for radsec

4 years agouse proxy->vps, in line with other uses
Alan T. DeKok [Thu, 1 Apr 2021 20:03:03 +0000 (16:03 -0400)] 
use proxy->vps, in line with other uses

4 years agoadd WITH_COA_TUNNEL to build
Alan T. DeKok [Thu, 1 Apr 2021 19:54:46 +0000 (15:54 -0400)] 
add WITH_COA_TUNNEL to build

4 years agoglue in the code to look up listeners by key.
Alan T. DeKok [Thu, 1 Apr 2021 19:48:46 +0000 (15:48 -0400)] 
glue in the code to look up listeners by key.

* add a listen_free_all() function, which frees mainconfig.listen
and then also the listeners keyed by CoA

* put a linked list into the send_coa listeners, so that all
listeners of the same key can be found

* have each send_coa listener point to the main "key" data
structure

* the main "key" data structure contains the key name, the list
of listeners by this key, and a mutex

* added contents to init / free / add / delete / find functions

4 years agorespect Proxy-To-Originating-Realm in request_coa_originate()
Alan T. DeKok [Thu, 1 Apr 2021 18:37:29 +0000 (14:37 -0400)] 
respect Proxy-To-Originating-Realm in request_coa_originate()

this isn't entirely the correct name for how we use the attribute,
but it's at least consistent with the rest of the server.

4 years agomake request_coa_originate() follow the other methods
Alan T. DeKok [Thu, 1 Apr 2021 18:17:14 +0000 (14:17 -0400)] 
make request_coa_originate() follow the other methods

4 years agoallow for reverse coa proxying in request_will_proxy()
Alan T. DeKok [Thu, 1 Apr 2021 15:24:45 +0000 (11:24 -0400)] 
allow for reverse coa proxying in request_will_proxy()

Add new Proxy-To-Originating-Realm attribute, and change
TCP-Session-Key to Originating-Realm-Key, which is perhaps
a little clearer.

also note that when we automatically create a home server
for incoming TLS connections, we set home->server, not
home->coa_server

4 years agotrack the number of IDs used, so that we can allocate a free listener
Alan T. DeKok [Thu, 1 Apr 2021 15:07:05 +0000 (11:07 -0400)] 
track the number of IDs used, so that we can allocate a free listener

4 years agostart of add / delete / lookup API for reverse coa listeners
Alan T. DeKok [Thu, 1 Apr 2021 14:43:48 +0000 (10:43 -0400)] 
start of add / delete / lookup API for reverse coa listeners

4 years agoprocess coa replies through the coa server
Alan T. DeKok [Thu, 1 Apr 2021 14:09:51 +0000 (10:09 -0400)] 
process coa replies through the coa server

4 years agomore descriptive errors for people who don't read the documentation
Alan T. DeKok [Thu, 1 Apr 2021 13:41:23 +0000 (09:41 -0400)] 
more descriptive errors for people who don't read the documentation

4 years agorearrange brackets to quiet scan
Alan T. DeKok [Thu, 1 Apr 2021 12:45:45 +0000 (08:45 -0400)] 
rearrange brackets to quiet scan

4 years agoonly define COA_TUNNEL if we have WITH_TLS
Alan T. DeKok [Wed, 31 Mar 2021 20:09:25 +0000 (16:09 -0400)] 
only define COA_TUNNEL if we have WITH_TLS

4 years agolet's define TCP-Session-Key
Alan T. DeKok [Wed, 31 Mar 2021 20:06:36 +0000 (16:06 -0400)] 
let's define TCP-Session-Key