]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agofr_dlist_num_elements should take a const head
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:07:09 +0000 (00:07 -0500)] 
fr_dlist_num_elements should take a const head

6 years agoOnly set num_timer_events if the event is going to execute the next time the service...
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:06:53 +0000 (00:06 -0500)] 
Only set num_timer_events if the event is going to execute the next time the service function is called

6 years agoMore checks for talloc_pooled_object
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:06:28 +0000 (00:06 -0500)] 
More checks for talloc_pooled_object

6 years agoHave event corral take an external time
Arran Cudbard-Bell [Sun, 24 Nov 2019 05:06:15 +0000 (00:06 -0500)] 
Have event corral take an external time

This can be more efficient, and means that was can control time for the purposes of testing

6 years agoAlways indicate when the connection was signalled to reconnect
Arran Cudbard-Bell [Sun, 24 Nov 2019 04:56:02 +0000 (23:56 -0500)] 
Always indicate when the connection was signalled to reconnect

6 years agoImmediately transition connections back to init if there's no reconnection delay
Arran Cudbard-Bell [Sun, 24 Nov 2019 04:54:22 +0000 (23:54 -0500)] 
Immediately transition connections back to init if there's no reconnection delay

6 years agoAdd debug output whenever we call a connection callback
Arran Cudbard-Bell [Sun, 24 Nov 2019 03:41:01 +0000 (22:41 -0500)] 
Add debug output whenever we call a connection callback

6 years agoInitialise lists when the connection is allocated, not when it enters the init state
Arran Cudbard-Bell [Sun, 24 Nov 2019 02:49:42 +0000 (21:49 -0500)] 
Initialise lists when the connection is allocated, not when it enters the init state

6 years agodns_label_length can return 0
Alan T. DeKok [Sat, 23 Nov 2019 20:17:17 +0000 (15:17 -0500)] 
dns_label_length can return 0

6 years agorevert to before changes
Alan T. DeKok [Fri, 22 Nov 2019 16:54:32 +0000 (11:54 -0500)] 
revert to before changes

6 years agorun only one child make
Alan T. DeKok [Fri, 22 Nov 2019 16:16:18 +0000 (11:16 -0500)] 
run only one child make

6 years agotry to quiet make
Alan T. DeKok [Fri, 22 Nov 2019 16:10:45 +0000 (11:10 -0500)] 
try to quiet make

6 years agoensure we build CA before server / ocsp / client certs
Alan T. DeKok [Fri, 22 Nov 2019 15:48:55 +0000 (10:48 -0500)] 
ensure we build CA before server / ocsp / client certs

6 years agoreorder rules for generating passwords.mk
Alan T. DeKok [Fri, 22 Nov 2019 15:48:23 +0000 (10:48 -0500)] 
reorder rules for generating passwords.mk

6 years agoThe dhcpv6 'packet_*.txt' should decode only the hex
Jorge Pereira [Fri, 22 Nov 2019 00:42:57 +0000 (21:42 -0300)] 
The dhcpv6 'packet_*.txt' should decode only the hex

It was updated using the tool scripts/pcap2decode-proto.py

e.g:

./scripts/pcap2decode-proto.py -p dhcpv6 \
-f ../tcpdump.git/tests/dhcpv6-ia-pd.pcap \
> src/tests/unit/protocols/dhcpv6/packet_ia-pd.txt

6 years agoalways define GENERATED_CERT_FILES
Alan T. DeKok [Fri, 22 Nov 2019 15:19:52 +0000 (10:19 -0500)] 
always define GENERATED_CERT_FILES

6 years agoadd rule for "dh", too
Alan T. DeKok [Fri, 22 Nov 2019 14:28:08 +0000 (09:28 -0500)] 
add rule for "dh", too

6 years agobetter rules to create certificates
Alan T. DeKok [Fri, 22 Nov 2019 13:57:59 +0000 (08:57 -0500)] 
better rules to create certificates

so we don't have all certs depending on all cnf files

6 years agocall dhcpv6 encode_value from the struct encoder
Alan T. DeKok [Thu, 21 Nov 2019 20:48:26 +0000 (15:48 -0500)] 
call dhcpv6 encode_value from the struct encoder

which then changes all of the dates in the tests, as DHCPv6
starts dates from Jan 1 2000, instead of Jan 1 1970.

6 years agofix DHCPv6 date encode / decode
Alan T. DeKok [Thu, 21 Nov 2019 19:26:09 +0000 (14:26 -0500)] 
fix DHCPv6 date encode / decode

decode didn't add the date offset from Jan 1 1970 --> Jan 1, 2000.

encode added 30*365*86400, which doesn't account for the fact that
years are ~365.25 days long.

6 years agoallow encoding of time_delta in dhcpv6
Alan T. DeKok [Thu, 21 Nov 2019 19:09:07 +0000 (14:09 -0500)] 
allow encoding of time_delta in dhcpv6

and print out type names for unsupported types

6 years agoreturn correct lengths for time delta / date attributes
Alan T. DeKok [Thu, 21 Nov 2019 19:07:52 +0000 (14:07 -0500)] 
return correct lengths for time delta / date attributes

6 years agocopy over key fields, too
Alan T. DeKok [Thu, 21 Nov 2019 18:54:35 +0000 (13:54 -0500)] 
copy over key fields, too

6 years agoremove extraneous check
Alan T. DeKok [Thu, 21 Nov 2019 13:39:36 +0000 (08:39 -0500)] 
remove extraneous check

6 years agoIncrease the 'nasportid' SQL field for 'varchar(32)'. ref #3141
Jorge Pereira [Tue, 19 Nov 2019 22:01:47 +0000 (19:01 -0300)] 
Increase the 'nasportid' SQL field for 'varchar(32)'. ref #3141

6 years agoalways call protocol-specific decode_value, if we have it
Alan T. DeKok [Thu, 21 Nov 2019 13:31:24 +0000 (08:31 -0500)] 
always call protocol-specific decode_value, if we have it

6 years agoPrint the test module dir and the test file (#3153)
Jorge Pereira [Wed, 20 Nov 2019 22:44:59 +0000 (19:44 -0300)] 
Print the test module dir and the test file (#3153)

It will print like:

UNIT-TEST dhcpv6 rfc6939

Instead of:

UNIT-TEST src/tests/unit/protocols/dhcpv6/rfc6939.txt

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