]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agocheck "extra" flag before checking subtype
Alan T. DeKok [Wed, 20 Nov 2019 21:14:26 +0000 (16:14 -0500)] 
check "extra" flag before checking subtype

6 years agowhitespace, formatting, etc.
Alan T. DeKok [Wed, 20 Nov 2019 20:42:46 +0000 (15:42 -0500)] 
whitespace, formatting, etc.

ensure that the last line ends with CR, add license

6 years agoAdd tests for DHCPv6 packets / ntp-server
Jorge Pereira [Wed, 20 Nov 2019 18:02:16 +0000 (15:02 -0300)] 
Add tests for DHCPv6 packets / ntp-server

Based on https://github.com/the-tcpdump-group/tcpdump/blob/master/tests/dhcpv6-ntp-server.pcap

6 years agoAdd tests for DHCPv6 packets / sip-server-d
Jorge Pereira [Wed, 20 Nov 2019 18:02:21 +0000 (15:02 -0300)] 
Add tests for DHCPv6 packets / sip-server-d

Based on https://github.com/the-tcpdump-group/tcpdump/blob/master/tests/dhcpv6-sip-server-d.pcap

6 years agoAdd tests for DHCPv6 packets / ia-ta
Jorge Pereira [Wed, 20 Nov 2019 18:02:05 +0000 (15:02 -0300)] 
Add tests for DHCPv6 packets / ia-ta

Based on https://github.com/the-tcpdump-group/tcpdump/blob/master/tests/dhcpv6-ia-ta.pcap

6 years agoAdd tests for DHCPv6 packets / ia-pd
Jorge Pereira [Wed, 20 Nov 2019 18:11:01 +0000 (15:11 -0300)] 
Add tests for DHCPv6 packets / ia-pd

Based on https://github.com/the-tcpdump-group/tcpdump/blob/master/tests/dhcpv6-ia-pd.pcap

6 years agoAdd tests for DHCPv6 packets / ia-na
Jorge Pereira [Wed, 20 Nov 2019 18:01:54 +0000 (15:01 -0300)] 
Add tests for DHCPv6 packets / ia-na

Based on https://github.com/the-tcpdump-group/tcpdump/blob/master/tests/dhcpv6-ia-na.pcap

6 years agoAdd tests for DHCPv6 packets / Domain-List
Jorge Pereira [Tue, 19 Nov 2019 23:50:31 +0000 (20:50 -0300)] 
Add tests for DHCPv6 packets / Domain-List

Based on https://github.com/the-tcpdump-group/tcpdump/blob/master/tests/dhcpv6-domain-list.pcap

6 years agoAdd tests for DHCPv6 packets / AFTR-Name & rfc6334
Jorge Pereira [Tue, 19 Nov 2019 22:14:15 +0000 (19:14 -0300)] 
Add tests for DHCPv6 packets / AFTR-Name & rfc6334

6 years agoAdd example coa-relay site
Terry Burton [Thu, 14 Nov 2019 19:49:59 +0000 (19:49 +0000)] 
Add example coa-relay site

6 years agorlm_radius: Allow bare calls to module from any section
Terry Burton [Tue, 19 Nov 2019 18:38:59 +0000 (18:38 +0000)] 
rlm_radius: Allow bare calls to module from any section

6 years agorlm_radius: Add "originate" flag to suppress addition of Proxy-State attribute
Terry Burton [Tue, 19 Nov 2019 18:37:45 +0000 (18:37 +0000)] 
rlm_radius: Add "originate" flag to suppress addition of Proxy-State attribute

6 years agoAdd tests for DHCPv6 packets 'client <-> server' (#3122)
Jorge Pereira [Wed, 20 Nov 2019 18:35:18 +0000 (15:35 -0300)] 
Add tests for DHCPv6 packets 'client <-> server' (#3122)

6 years agoAdd missing 'dict' test in 'make test'
Jorge Pereira [Tue, 19 Nov 2019 17:13:30 +0000 (14:13 -0300)] 
Add missing 'dict' test in 'make test'

6 years agouse fr_allocate instead of sp_allocate
Alan T. DeKok [Tue, 19 Nov 2019 19:57:57 +0000 (14:57 -0500)] 
use fr_allocate instead of sp_allocate

so anyone rooting thru the list of stored procedures knows that
it's a FR function

6 years agoPostgreSQL sqlippools: Find and allocate stored procedure
Terry Burton [Mon, 18 Nov 2019 02:47:50 +0000 (02:47 +0000)] 
PostgreSQL sqlippools: Find and allocate stored procedure

PostgreSQL sqlippools: Find and allocate stored procedure

Replace existing stored procedure with one that combines the
allocate_find and allocate_update queries.

We can additionally avoid round trips by avoiding BEGIN and COMMIT since
calling an SP provides a new transaction context [*]. Therefore the IP
allocation process is reduced to running a single statement.

Indicative performance testing showed increased IP allocation
performance from 120 allocs/sec with separate queries to 1500 allocs/sec
on a two-node master/slave cluster.

[*] Verfied as follows which indicates that we are within a transaction
rather than "autocommit"ing:

  > CREATE OR REPLACE FUNCTION sp_txid ()
  RETURNS text
  LANGUAGE plpgsql
  AS $$
  DECLARE
  BEGIN
    -- Write the current txid to a table
    INSERT INTO txids SELECT txid_current();
    INSERT INTO txids SELECT txid_current();
    RETURN txid_current();
    END$$;

  > CREATE TEMPORARY TABLE txids (txid TEXT);

  > SELECT sp_txid();
  txsp_txid = 651120
  > SELECT sp_txid();
  txsp_txid = 651121

  > SELECT * FROM txids
  txids
      -------
      651120
      651120
      651121
      651121

6 years agostop if we get to a sibling structure
Alan T. DeKok [Tue, 19 Nov 2019 19:45:48 +0000 (14:45 -0500)] 
stop if we get to a sibling structure

i.e. if we want to encode 2 of the same structs in a row

6 years agoAdd tests for DHCPv6 / rfc6225
Jorge Pereira [Tue, 19 Nov 2019 01:37:02 +0000 (22:37 -0300)] 
Add tests for DHCPv6 / rfc6225

6 years agoFix formatting in dictionary files (#3138)
Jorge Pereira [Tue, 19 Nov 2019 13:41:17 +0000 (10:41 -0300)] 
Fix formatting in dictionary files (#3138)

e.g: make dictionary.format

6 years agoFix typo in rfc6225 dictionary (#3137)
Jorge Pereira [Tue, 19 Nov 2019 04:33:37 +0000 (01:33 -0300)] 
Fix typo in rfc6225 dictionary (#3137)

6 years agoUpdate 'Client-FQDN-Flag' to use bit fields
Jorge Pereira [Tue, 19 Nov 2019 01:05:13 +0000 (22:05 -0300)] 
Update 'Client-FQDN-Flag' to use bit fields

6 years agoadd DNS label decoding to structs, and update the tests
Alan T. DeKok [Mon, 18 Nov 2019 23:44:12 +0000 (18:44 -0500)] 
add DNS label decoding to structs, and update the tests

6 years agoset next on exit only if we didn't already set it
Alan T. DeKok [Mon, 18 Nov 2019 23:30:39 +0000 (18:30 -0500)] 
set next on exit only if we didn't already set it

6 years agodon't overflow the input buffer :(
Alan T. DeKok [Mon, 18 Nov 2019 22:25:22 +0000 (17:25 -0500)] 
don't overflow the input buffer :(

6 years agoset "next" appropriately, i.e. to the start of the buffer
Alan T. DeKok [Mon, 18 Nov 2019 22:07:45 +0000 (17:07 -0500)] 
set "next" appropriately, i.e. to the start of the buffer

6 years agoset next on end of buffer, too
Alan T. DeKok [Mon, 18 Nov 2019 22:05:40 +0000 (17:05 -0500)] 
set next on end of buffer, too

6 years agodon't use $(DIR) in rules
Alan T. DeKok [Mon, 18 Nov 2019 16:52:11 +0000 (11:52 -0500)] 
don't use $(DIR) in rules

6 years agoDon't leak if legendre() failure (#3135)
Jorge Pereira [Mon, 18 Nov 2019 18:10:38 +0000 (15:10 -0300)] 
Don't leak if legendre() failure (#3135)

* Fix formatting in EAP-PWD

* Don't leak if legendre() failure

6 years agoBetter don't use hardcoded values for the test dir and output
Jorge Pereira [Sun, 17 Nov 2019 02:09:57 +0000 (23:09 -0300)] 
Better don't use hardcoded values for the test dir and output

We should use the exported vars $(OUTPUT) where the output
of the test goes and the $(DIR) to reference the dir where
the test files can be found.

6 years agoExport the vars TESTDIR and OUTPUT for radiusd tests
Jorge Pereira [Sun, 17 Nov 2019 02:09:16 +0000 (23:09 -0300)] 
Export the vars TESTDIR and OUTPUT for radiusd tests

6 years agoWrap radmin expansions in MEM macro
Arran Cudbard-Bell [Mon, 18 Nov 2019 16:24:34 +0000 (11:24 -0500)] 
Wrap radmin expansions in MEM macro

6 years agoFix formatting in EAP-PWD
Arran Cudbard-Bell [Mon, 18 Nov 2019 16:24:19 +0000 (11:24 -0500)] 
Fix formatting in EAP-PWD

6 years agoAdd mem wrappers for firebird
Arran Cudbard-Bell [Mon, 18 Nov 2019 16:23:47 +0000 (11:23 -0500)] 
Add mem wrappers for firebird

6 years agoFix typo
Arran Cudbard-Bell [Mon, 18 Nov 2019 16:22:35 +0000 (11:22 -0500)] 
Fix typo

6 years agoFix permissions of certs in bootstrap fallback
Natanael Copa [Mon, 18 Nov 2019 14:26:41 +0000 (15:26 +0100)] 
Fix permissions of certs in bootstrap fallback

fix case where `make` is not available and boostrap fallback is used.

This is a follow up to commit 29add135c8d1 (Relax OpenSSL permissions
for default key files).

Reported downstream: https://gitlab.alpinelinux.org/alpine/aports/issues/10958

6 years agoInitialise the element count
Arran Cudbard-Bell [Mon, 18 Nov 2019 14:42:59 +0000 (09:42 -0500)] 
Initialise the element count

6 years agoCheck after each pre/post callback to see if we should free the connection
Arran Cudbard-Bell [Mon, 18 Nov 2019 14:00:38 +0000 (09:00 -0500)] 
Check after each pre/post callback to see if we should free the connection

6 years agoAdd element counts to dlists
Arran Cudbard-Bell [Mon, 18 Nov 2019 14:00:02 +0000 (09:00 -0500)] 
Add element counts to dlists

6 years agoAdd extra tests for radmin
Jorge Pereira [Fri, 15 Nov 2019 21:18:23 +0000 (18:18 -0300)] 
Add extra tests for radmin

6 years agoMinor fixes
Arran Cudbard-Bell [Sun, 17 Nov 2019 05:42:18 +0000 (00:42 -0500)] 
Minor fixes

6 years agoAdd untested Redis async I/O integration code
Arran Cudbard-Bell [Sun, 17 Nov 2019 05:40:52 +0000 (00:40 -0500)] 
Add untested Redis async I/O integration code

Should be enough to glue a redis connection into our event loop and connection API.

6 years agoFix boilerplate in redis headers
Arran Cudbard-Bell [Sun, 17 Nov 2019 05:39:49 +0000 (00:39 -0500)] 
Fix boilerplate in redis headers

6 years agoMore typos
Arran Cudbard-Bell [Sun, 17 Nov 2019 05:06:58 +0000 (00:06 -0500)] 
More typos

6 years agoFix typos
Arran Cudbard-Bell [Sun, 17 Nov 2019 04:43:43 +0000 (23:43 -0500)] 
Fix typos

6 years agoRework connection API to be 100% handle type agnostic
Arran Cudbard-Bell [Sun, 17 Nov 2019 04:15:08 +0000 (23:15 -0500)] 
Rework connection API to be 100% handle type agnostic

- Add watch points
- Invert relationship between conn and handle.  handle is now a child of conn.  conn is the main struct that's interacted with.
- make conn available in the init callback.

Seems to work, at least with rlm_radius

6 years agoround up when checking bounds
Alan T. DeKok [Sat, 16 Nov 2019 20:54:58 +0000 (15:54 -0500)] 
round up when checking bounds

6 years agowe don't need a 'length=uint16' for uint32 types
Alan T. DeKok [Sat, 16 Nov 2019 19:03:19 +0000 (14:03 -0500)] 
we don't need a 'length=uint16' for uint32 types

6 years agouse - instead of _
Alan T. DeKok [Sat, 16 Nov 2019 18:49:55 +0000 (13:49 -0500)] 
use - instead of _

6 years agoUpdate copyright header for DHCPv6 unit tests
Jorge Pereira [Sat, 16 Nov 2019 17:12:15 +0000 (14:12 -0300)] 
Update copyright header for DHCPv6 unit tests

6 years agoBetter error message
Jorge Pereira [Thu, 14 Nov 2019 20:47:00 +0000 (17:47 -0300)] 
Better error message

6 years agoFix eap test
Jorge Pereira [Thu, 14 Nov 2019 20:46:31 +0000 (17:46 -0300)] 
Fix eap test

6 years agoFix radmin test
Jorge Pereira [Thu, 14 Nov 2019 20:45:59 +0000 (17:45 -0300)] 
Fix radmin test

6 years agoqualify names appropriately
Alan T. DeKok [Sat, 16 Nov 2019 15:29:51 +0000 (10:29 -0500)] 
qualify names appropriately

6 years agoadd VALUEs
Alan T. DeKok [Sat, 16 Nov 2019 15:08:10 +0000 (10:08 -0500)] 
add VALUEs

6 years agodecode horrific structure
Alan T. DeKok [Sat, 16 Nov 2019 15:05:29 +0000 (10:05 -0500)] 
decode horrific structure

6 years agofix for new TEST_BOOTSTRAP
Alan T. DeKok [Sat, 16 Nov 2019 14:57:47 +0000 (09:57 -0500)] 
fix for new TEST_BOOTSTRAP

6 years agoadd bit field decoding
Alan T. DeKok [Sat, 16 Nov 2019 14:55:37 +0000 (09:55 -0500)] 
add bit field decoding

6 years agowe still need this
Alan T. DeKok [Fri, 15 Nov 2019 20:19:42 +0000 (15:19 -0500)] 
we still need this

6 years agouse correct path for binaries
Alan T. DeKok [Fri, 15 Nov 2019 19:48:20 +0000 (14:48 -0500)] 
use correct path for binaries

6 years agono longer need this
Alan T. DeKok [Fri, 15 Nov 2019 19:45:48 +0000 (14:45 -0500)] 
no longer need this

6 years agocleanups. Helps with #3125
Alan T. DeKok [Fri, 15 Nov 2019 19:05:53 +0000 (14:05 -0500)] 
cleanups.  Helps with #3125

6 years agoadd bit field encoding.
Alan T. DeKok [Fri, 15 Nov 2019 18:17:12 +0000 (13:17 -0500)] 
add bit field encoding.

Bit field decoding is not yet done.

6 years agoparse bit[n] as a MEMBER of a STRUCT
Alan T. DeKok [Fri, 15 Nov 2019 12:33:05 +0000 (07:33 -0500)] 
parse bit[n] as a MEMBER of a STRUCT

with validation checks that the bits end on a bit boundary.
bit[1] becomes a BOOL.  Everythijng else is rounded up to the
next sized uint.

No struct encode / decode for bit fields yet.

6 years agoDictionary dump will work on both types of dictionary
Arran Cudbard-Bell [Thu, 14 Nov 2019 21:28:08 +0000 (16:28 -0500)] 
Dictionary dump will work on both types of dictionary

6 years agocorrectly set makefile var
Matthew Newton [Thu, 14 Nov 2019 01:43:01 +0000 (01:43 +0000)] 
correctly set makefile var

6 years agoParameterise jenkinsfile
Matthew Newton [Thu, 14 Nov 2019 00:33:18 +0000 (00:33 +0000)] 
Parameterise jenkinsfile

6 years agowhitespace
Matthew Newton [Mon, 11 Nov 2019 23:24:52 +0000 (23:24 +0000)] 
whitespace

6 years agoSplit jenkinsfile so we can use the functions elsewhere
Matthew Newton [Thu, 14 Nov 2019 00:17:44 +0000 (00:17 +0000)] 
Split jenkinsfile so we can use the functions elsewhere

6 years agoadd stupid hacks for one attribute
Alan T. DeKok [Thu, 14 Nov 2019 00:21:22 +0000 (19:21 -0500)] 
add stupid hacks for one attribute

which can be a partial domain name, with no trailing zero.

6 years agopass TLV stack to struct encoder
Alan T. DeKok [Wed, 13 Nov 2019 21:27:59 +0000 (16:27 -0500)] 
pass TLV stack to struct encoder

along with a protocol-specific encode_value() callback.
Which for now is only used in limited cases, because of poor
interation between the requirements of the struct encoder,
and the tlv_stack magic.

6 years agoallow subtypes in structs
Alan T. DeKok [Wed, 13 Nov 2019 21:26:19 +0000 (16:26 -0500)] 
allow subtypes in structs

we now assume that the protocol encoder can take care of this

6 years agofields inside of a struct are ordered
Alan T. DeKok [Wed, 13 Nov 2019 21:19:06 +0000 (16:19 -0500)] 
fields inside of a struct are ordered

and DNS labels end with a zero byte

6 years agoset name1/name2 as appropriate
Alan T. DeKok [Wed, 13 Nov 2019 18:59:34 +0000 (13:59 -0500)] 
set name1/name2 as appropriate

6 years agoAdd missing 'decode-pair' for rfc6355 tests (#3121)
Jorge Pereira [Wed, 13 Nov 2019 18:28:58 +0000 (15:28 -0300)] 
Add missing 'decode-pair' for rfc6355 tests (#3121)

6 years agotypo
Alan T. DeKok [Wed, 13 Nov 2019 16:41:44 +0000 (11:41 -0500)] 
typo

6 years agomove dhcp validation to dhcp code.
Alan T. DeKok [Wed, 13 Nov 2019 15:40:22 +0000 (10:40 -0500)] 
move dhcp validation to dhcp code.

and extend validation

6 years agoclarify messages
Alan T. DeKok [Wed, 13 Nov 2019 15:36:51 +0000 (10:36 -0500)] 
clarify messages

6 years agoit's a UDP message, not necessarily a DHCP one
Alan T. DeKok [Wed, 13 Nov 2019 15:30:48 +0000 (10:30 -0500)] 
it's a UDP message, not necessarily a DHCP one

6 years agoUpdate unit tests for rfc6355
Jorge Pereira [Wed, 13 Nov 2019 00:56:13 +0000 (21:56 -0300)] 
Update unit tests for rfc6355

Add tests for the Server-ID-DUID attribute

6 years agoAdd tests for DHCPv6 / rfc4704
Jorge Pereira [Tue, 12 Nov 2019 20:44:34 +0000 (17:44 -0300)] 
Add tests for DHCPv6 / rfc4704

6 years agoadd attr_valid callback to dictionaries
Alan T. DeKok [Wed, 13 Nov 2019 14:06:43 +0000 (09:06 -0500)] 
add attr_valid callback to dictionaries

and move callbacks to RADIUS

6 years agomake the tests actually run
Alan T. DeKok [Wed, 13 Nov 2019 14:06:24 +0000 (09:06 -0500)] 
make the tests actually run

6 years agouse protocol agnostic checks
Alan T. DeKok [Wed, 13 Nov 2019 14:04:06 +0000 (09:04 -0500)] 
use protocol agnostic checks

6 years agotransaction ID is now octets
Alan T. DeKok [Wed, 13 Nov 2019 13:55:30 +0000 (08:55 -0500)] 
transaction ID is now octets

6 years agomake transaction id octets
Alan T. DeKok [Wed, 13 Nov 2019 12:55:48 +0000 (07:55 -0500)] 
make transaction id octets

seeing as it's a 24-bit random value, it's easier to treat it as
octets then as a large decimal number

6 years agoencode_struct() already skips ahead
Alan T. DeKok [Tue, 12 Nov 2019 23:59:02 +0000 (18:59 -0500)] 
encode_struct() already skips ahead

so we don't need to do it here in encode_value()

6 years agonotes on OIDs for EAP over LAN / WAN. From RFC 4334
Alan T. DeKok [Tue, 12 Nov 2019 20:18:32 +0000 (15:18 -0500)] 
notes on OIDs for EAP over LAN / WAN.  From RFC 4334

6 years agotypo
Alan T. DeKok [Tue, 12 Nov 2019 20:10:16 +0000 (15:10 -0500)] 
typo

6 years agoAfter too many years of effort, magic occurs.
Alan T. DeKok [Tue, 12 Nov 2019 19:43:12 +0000 (14:43 -0500)] 
After too many years of effort, magic occurs.

6 years agorearrange fill routine
Alan T. DeKok [Tue, 12 Nov 2019 19:31:15 +0000 (14:31 -0500)] 
rearrange fill routine

in prepation for allowing it to be called from multiple places

6 years agomove if / elsif / map magic to callback functions
Alan T. DeKok [Tue, 12 Nov 2019 19:19:05 +0000 (14:19 -0500)] 
move if / elsif / map magic to callback functions

in preparation for dynamically setting them

6 years agomore docs
Alan T. DeKok [Tue, 12 Nov 2019 19:17:05 +0000 (14:17 -0500)] 
more docs

6 years agorearrange to check for key words before "end of work"
Alan T. DeKok [Tue, 12 Nov 2019 19:02:44 +0000 (14:02 -0500)] 
rearrange to check for key words before "end of work"

and change "map" to not get excited over '{'

6 years agoremove one more goto
Alan T. DeKok [Mon, 11 Nov 2019 20:35:44 +0000 (15:35 -0500)] 
remove one more goto

6 years agomore rearrangement to make the code simpler
Alan T. DeKok [Mon, 11 Nov 2019 20:25:53 +0000 (15:25 -0500)] 
more rearrangement to make the code simpler

6 years agomove stack cleanup to cf_stack_cleanup()
Alan T. DeKok [Mon, 11 Nov 2019 20:16:05 +0000 (15:16 -0500)] 
move stack cleanup to cf_stack_cleanup()

which removes a bunch of "goto error" in cf_file_include()

6 years agomore cleanups
Alan T. DeKok [Mon, 11 Nov 2019 20:09:01 +0000 (15:09 -0500)] 
more cleanups

move complex functionality to separate functions.
in preparation for even more cleanups

6 years agouse the correct OID
Alan T. DeKok [Mon, 11 Nov 2019 19:25:43 +0000 (14:25 -0500)] 
use the correct OID

6 years agoremove unused variable
Alan T. DeKok [Mon, 11 Nov 2019 17:34:11 +0000 (12:34 -0500)] 
remove unused variable

6 years agoAllow verbosity only where is important (#3114)
Jorge Pereira [Mon, 11 Nov 2019 17:33:03 +0000 (14:33 -0300)] 
Allow verbosity only where is important (#3114)