]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
5 years agofix use of packet names. Fixes #3593
Alan T. DeKok [Mon, 24 Aug 2020 18:31:02 +0000 (14:31 -0400)] 
fix use of packet names.  Fixes #3593

5 years agohandle tmpl && multi
Alan T. DeKok [Mon, 24 Aug 2020 17:44:12 +0000 (13:44 -0400)] 
handle tmpl && multi

5 years agohoist pass2 tmpl code into separate function
Alan T. DeKok [Mon, 24 Aug 2020 17:37:38 +0000 (13:37 -0400)] 
hoist pass2 tmpl code into separate function

in preparation for handling tmpl && multi

5 years agorename function for clarity
Alan T. DeKok [Mon, 24 Aug 2020 15:42:17 +0000 (11:42 -0400)] 
rename function for clarity

5 years agohoist check for shared secret into proto_tacacs.c
Alan T. DeKok [Mon, 24 Aug 2020 15:39:33 +0000 (11:39 -0400)] 
hoist check for shared secret into proto_tacacs.c

so it isn't duplicated everywhere

5 years agoreturn correct value from fr_dns_label_from_value_box()
Alan T. DeKok [Mon, 24 Aug 2020 15:37:45 +0000 (11:37 -0400)] 
return correct value from fr_dns_label_from_value_box()

rearrange the code to do sanity checks before writing to
the output buffer.

Add more tests for error cases

5 years agotacas: Fix TACACS-Data decode
Jorge Pereira [Mon, 24 Aug 2020 15:36:07 +0000 (12:36 -0300)] 
tacas: Fix TACACS-Data decode

5 years agotacacs: Fix fr_pair_afrom_da() use in mod_process()
Jorge Pereira [Mon, 24 Aug 2020 15:16:07 +0000 (12:16 -0300)] 
tacacs: Fix fr_pair_afrom_da() use in mod_process()

5 years agocheck for encrypted user names here, too
Alan T. DeKok [Mon, 24 Aug 2020 12:46:32 +0000 (08:46 -0400)] 
check for encrypted user names here, too

5 years agocheck string, not character
Alan T. DeKok [Mon, 24 Aug 2020 12:43:10 +0000 (08:43 -0400)] 
check string, not character

5 years agoadd proto_tacacs_autz
Alan T. DeKok [Mon, 24 Aug 2020 12:14:46 +0000 (08:14 -0400)] 
add proto_tacacs_autz

5 years agouse standard API for length of UTF8 string
Alan T. DeKok [Mon, 24 Aug 2020 12:06:06 +0000 (08:06 -0400)] 
use standard API for length of UTF8 string

5 years agoadd support for "single connect" mode.
Alan T. DeKok [Mon, 24 Aug 2020 11:29:07 +0000 (07:29 -0400)] 
add support for "single connect" mode.

Which means reusing the single connection for multiple packets.

The TACACS+ names are retarded.

5 years agofix stats
Alan T. DeKok [Mon, 24 Aug 2020 02:35:04 +0000 (22:35 -0400)] 
fix stats

count requests.
and only count responses the first time we try to write

5 years agoupdate comments
Alan T. DeKok [Sun, 23 Aug 2020 20:38:29 +0000 (16:38 -0400)] 
update comments

5 years agoremove unused variables
Alan T. DeKok [Sun, 23 Aug 2020 15:43:57 +0000 (11:43 -0400)] 
remove unused variables

5 years agocreate internal TACACS-State, and use listener + session_id
Alan T. DeKok [Sun, 23 Aug 2020 15:31:57 +0000 (11:31 -0400)] 
create internal TACACS-State, and use listener + session_id

for tracking state.  The proto_tacacs_auth code is common across
multiple listeners.  This means that there may be multiple
listeners which have sessions with the same session_id.

We don't want those sessions to get confused, so we make them
unique by associating them with a listener.

5 years agorpm spec: ensure libcurl version
Matthew Newton [Mon, 24 Aug 2020 01:25:16 +0000 (02:25 +0100)] 
rpm spec: ensure libcurl version

Might as well fail early

5 years agorlm_sigtran: fix a few warnings
Matthew Newton [Sun, 23 Aug 2020 23:11:26 +0000 (00:11 +0100)] 
rlm_sigtran: fix a few warnings

5 years agoTwo args, not three; the type is found automatically
Matthew Newton [Sun, 23 Aug 2020 16:41:39 +0000 (17:41 +0100)] 
Two args, not three; the type is found automatically

5 years agotalloc: Add macro for iterating over arrays
Arran Cudbard-Bell [Sun, 23 Aug 2020 03:13:09 +0000 (22:13 -0500)] 
talloc: Add macro for iterating over arrays

5 years agoFormatting
Arran Cudbard-Bell [Fri, 21 Aug 2020 23:09:01 +0000 (18:09 -0500)] 
Formatting

5 years agorlm_sigtran: thread instance struct
Matthew Newton [Sat, 22 Aug 2020 23:54:36 +0000 (00:54 +0100)] 
rlm_sigtran: thread instance struct

5 years agorlm_sigtran: fr_dict_t should be const
Matthew Newton [Sat, 22 Aug 2020 23:29:57 +0000 (00:29 +0100)] 
rlm_sigtran: fr_dict_t should be const

5 years agoseparate connected and unconnected socket tracking trees
Alan T. DeKok [Sat, 22 Aug 2020 16:32:25 +0000 (12:32 -0400)] 
separate connected and unconnected socket tracking trees

5 years agoparent track->ev timer from track, not from client
Alan T. DeKok [Sat, 22 Aug 2020 16:18:31 +0000 (12:18 -0400)] 
parent track->ev timer from track, not from client

5 years agoallow VENDOR and TLV to be unknown types
Alan T. DeKok [Sat, 22 Aug 2020 15:11:16 +0000 (11:11 -0400)] 
allow VENDOR and TLV to be unknown types

all others are mangled to OCTETS.  There's no need (or use)
for other types to be unknown.  If we know it's data type UINT32,
then it's not unknown, and we shouldn't treat it as such.

5 years agocheck minor versions against packet flow
Alan T. DeKok [Sat, 22 Aug 2020 12:49:51 +0000 (08:49 -0400)] 
check minor versions against packet flow

PAP / CHAP / MS-CHAP are minor version 1.

Everything else is minor version 0

5 years agofree temporary da
Alan T. DeKok [Sat, 22 Aug 2020 12:35:44 +0000 (08:35 -0400)] 
free temporary da

5 years agoclear flags on unknown DAs
Alan T. DeKok [Sat, 22 Aug 2020 12:35:16 +0000 (08:35 -0400)] 
clear flags on unknown DAs

5 years agoTACACS-Data is now octets
Alan T. DeKok [Sat, 22 Aug 2020 12:34:42 +0000 (08:34 -0400)] 
TACACS-Data is now octets

5 years agounknown attributes are always of type octets
Alan T. DeKok [Sat, 22 Aug 2020 12:10:03 +0000 (08:10 -0400)] 
unknown attributes are always of type octets

so we can create unknown DAs from known DAs of type != octets

5 years agotacacs: The TACACS-Data should be 'octets'
Jorge Pereira [Fri, 21 Aug 2020 20:57:02 +0000 (17:57 -0300)] 
tacacs: The TACACS-Data should be 'octets'

5 years agocf_parse: Handle the case where the tmpl is not an attribute
Arran Cudbard-Bell [Fri, 21 Aug 2020 19:50:43 +0000 (14:50 -0500)] 
cf_parse: Handle the case where the tmpl is not an attribute

5 years agoenforce minimum lengths on CHAP, MS-CHAP, and MS-CHAPv2
Alan T. DeKok [Fri, 21 Aug 2020 19:16:44 +0000 (15:16 -0400)] 
enforce minimum lengths on CHAP, MS-CHAP, and MS-CHAPv2

5 years agocf_parse: Fix pointer address we pass to parsing function when using FR_TYPE_TMPL...
Arran Cudbard-Bell [Fri, 21 Aug 2020 18:56:01 +0000 (13:56 -0500)] 
cf_parse: Fix pointer address we pass to parsing function when using FR_TYPE_TMPL | FR_TYPE_MULTI

5 years agoxlat: Rename the old style xlats to xlat_legacy
Arran Cudbard-Bell [Fri, 21 Aug 2020 18:51:00 +0000 (13:51 -0500)] 
xlat: Rename the old style xlats to xlat_legacy

- Remove async_safe flag from legacy registration function and move it to non-legacy function
- Rename async_safe to needs_async, which flips its meaning and makes merging flag sets easier.
- Add needs_async values to new style xlat functions which can actually be async, as opposed to the old style xlat functions which can never be async...

5 years agoadd names for reply packets, too
Alan T. DeKok [Fri, 21 Aug 2020 18:46:19 +0000 (14:46 -0400)] 
add names for reply packets, too

5 years ago:gear: master: Fix priority() instance parameter
Jorge Pereira [Fri, 21 Aug 2020 17:37:45 +0000 (14:37 -0300)] 
:gear: master: Fix priority() instance parameter

The modules expect the 'app_instance' instead of 'inst', fixing
runtime talloc abort.

5 years agotacacs: Enable mod_priority_set() function
Jorge Pereira [Fri, 21 Aug 2020 17:38:12 +0000 (14:38 -0300)] 
tacacs: Enable mod_priority_set() function

5 years agoreset subcs before looping over wildcards
Alan T. DeKok [Fri, 21 Aug 2020 16:46:23 +0000 (12:46 -0400)] 
reset subcs before looping over wildcards

5 years agoremove unused variable
Alan T. DeKok [Thu, 20 Aug 2020 21:54:42 +0000 (17:54 -0400)] 
remove unused variable

5 years agoensure things are initialized
Alan T. DeKok [Thu, 20 Aug 2020 21:54:09 +0000 (17:54 -0400)] 
ensure things are initialized

5 years agoimplement checks in draft Section 5.2
Alan T. DeKok [Thu, 20 Aug 2020 20:58:17 +0000 (16:58 -0400)] 
implement checks in draft Section 5.2

5 years agonotes about maximum length
Alan T. DeKok [Thu, 20 Aug 2020 20:52:00 +0000 (16:52 -0400)] 
notes about maximum length

5 years agowe need this, too
Alan T. DeKok [Thu, 20 Aug 2020 20:34:26 +0000 (16:34 -0400)] 
we need this, too

5 years agotacacs: Update raddb/sites-available/tacacs
Jorge Pereira [Tue, 11 Aug 2020 23:13:56 +0000 (20:13 -0300)] 
tacacs: Update raddb/sites-available/tacacs

5 years agotacacs: Add TACACS+ protocol module for authentication
Jorge Pereira [Fri, 14 Aug 2020 16:12:13 +0000 (13:12 -0300)] 
tacacs: Add TACACS+ protocol module for authentication

5 years agominor tweaks
Alan T. DeKok [Thu, 20 Aug 2020 14:48:06 +0000 (10:48 -0400)] 
minor tweaks

5 years agomaster: Remove redundancy
Jorge Pereira [Wed, 19 Aug 2020 16:14:19 +0000 (13:14 -0300)] 
master: Remove redundancy

5 years agomaster: Lets use talloc_get_type_abort_const()
Jorge Pereira [Wed, 19 Aug 2020 16:11:10 +0000 (13:11 -0300)] 
master: Lets use talloc_get_type_abort_const()

5 years agomake track->address "const"
Alan T. DeKok [Wed, 19 Aug 2020 22:15:56 +0000 (18:15 -0400)] 
make track->address "const"

as it's used in dedup comparisons

5 years agoif original exists, always initialize packet from it
Alan T. DeKok [Wed, 19 Aug 2020 22:08:21 +0000 (18:08 -0400)] 
if original exists, always initialize packet from it

which means we're a lot more forgiving about the admin setting
only specific attributes via unlang

5 years agocopy original header if we have it
Alan T. DeKok [Wed, 19 Aug 2020 21:29:59 +0000 (17:29 -0400)] 
copy original header if we have it

and if there's no VPs parented by TACACS-Packet.  This lets us
avoid some extra work, so we don't have to copy VPs from the
request to the reply

5 years agomore hacks to ensure assertions are correct
Alan T. DeKok [Wed, 19 Aug 2020 20:49:06 +0000 (16:49 -0400)] 
more hacks to ensure assertions are correct

5 years agoAmend redis_ippool to handle DHCP Request correctly (#3577)
Nick Porter [Wed, 19 Aug 2020 19:29:36 +0000 (20:29 +0100)] 
Amend redis_ippool to handle DHCP Request correctly (#3577)

A DHCP Request should update the address previously assigned in response
to a DHCP Discover.
Former behaviour used the same code as Discover which is less efficient
and also uses the "offer" time rather than the "lease" time for the
setting of the exipry time.

5 years agodhcpv6: Fix typo
Jorge Pereira [Wed, 19 Aug 2020 16:05:34 +0000 (13:05 -0300)] 
dhcpv6: Fix typo

5 years agomore asserts to catch random travis failures
Alan T. DeKok [Wed, 19 Aug 2020 15:50:06 +0000 (11:50 -0400)] 
more asserts to catch random travis failures

5 years agotacacs: Just use the 'data' to extract the payload
Jorge Pereira [Wed, 19 Aug 2020 15:37:34 +0000 (12:37 -0300)] 
tacacs: Just use the 'data' to extract the payload

5 years agocorrect check
Alan T. DeKok [Wed, 19 Aug 2020 15:32:28 +0000 (11:32 -0400)] 
correct check

if the expected headers are larger than the actual packet length,
then it's an error

5 years agoremove unused variable
Alan T. DeKok [Wed, 19 Aug 2020 15:19:02 +0000 (11:19 -0400)] 
remove unused variable

5 years agouse synthetic packet type for dedup
Alan T. DeKok [Wed, 19 Aug 2020 15:01:42 +0000 (11:01 -0400)] 
use synthetic packet type for dedup

5 years agotacacs: Fix the priority set
Jorge Pereira [Wed, 19 Aug 2020 14:59:07 +0000 (11:59 -0300)] 
tacacs: Fix the priority set

5 years agouse "in_buffer" value, and not data fragment size
Alan T. DeKok [Wed, 19 Aug 2020 14:27:45 +0000 (10:27 -0400)] 
use "in_buffer" value, and not data fragment size

we want to look at all of the data in the buffer, not just
the fragment we got from the current call to read()

5 years agotacacs: Add TACACS+ protocol module
Jorge Pereira [Fri, 14 Aug 2020 16:12:13 +0000 (13:12 -0300)] 
tacacs: Add TACACS+ protocol module

there is (as yet) no processing modules.

5 years agowe no longer need to manually add tacacs
Alan T. DeKok [Wed, 19 Aug 2020 13:41:22 +0000 (09:41 -0400)] 
we no longer need to manually add tacacs

5 years agouse uint32 for consistency with other protocols
Alan T. DeKok [Wed, 19 Aug 2020 13:41:07 +0000 (09:41 -0400)] 
use uint32 for consistency with other protocols

5 years agotacacs: Add 'Packet-Type' for TACACS+ dictionary
Jorge Pereira [Tue, 11 Aug 2020 22:03:02 +0000 (19:03 -0300)] 
tacacs: Add 'Packet-Type' for TACACS+ dictionary

these are synthetic packet types which are useful internally.
The tacacs+ header uses one field for packet type, and another
field for request / reply.

In the interests of making things simple for the end user,
we combine those fields onto a logical Packet-Type

5 years agoscripts: Add '-s <session_id>' option in scripts/tacacs/tacacs_client
Jorge Pereira [Tue, 18 Aug 2020 00:48:05 +0000 (21:48 -0300)] 
scripts: Add '-s <session_id>' option in scripts/tacacs/tacacs_client

5 years agoscripts: Add TACACS+ client
Jorge Pereira [Tue, 11 Aug 2020 22:01:05 +0000 (19:01 -0300)] 
scripts: Add TACACS+ client

5 years agoadd "original" to fr_tacacs_encode()
Alan T. DeKok [Wed, 19 Aug 2020 13:03:50 +0000 (09:03 -0400)] 
add "original" to fr_tacacs_encode()

and ensure that the various packet header fields are either
sane, or copied from the original request packet.

5 years agowe only support TACACS+ version 12.0 or 12.1
Alan T. DeKok [Wed, 19 Aug 2020 12:08:25 +0000 (08:08 -0400)] 
we only support TACACS+ version 12.0 or 12.1

5 years agouse authentication continue flags
Alan T. DeKok [Wed, 19 Aug 2020 11:48:21 +0000 (07:48 -0400)] 
use authentication continue flags

5 years agotypo
Alan T. DeKok [Wed, 19 Aug 2020 01:06:04 +0000 (21:06 -0400)] 
typo

5 years agofix size of allocation for tracking structure
Alan T. DeKok [Wed, 19 Aug 2020 00:41:51 +0000 (20:41 -0400)] 
fix size of allocation for tracking structure

which is itself, plus an address, plus a packet ctx

5 years agoallocate substructure from tracking context, not from client
Alan T. DeKok [Wed, 19 Aug 2020 00:40:11 +0000 (20:40 -0400)] 
allocate substructure from tracking context, not from client

ptrs in structs should be parented by the struct

5 years agoBuild TACACS+ dictionary header too
Jorge Pereira [Tue, 18 Aug 2020 23:40:40 +0000 (20:40 -0300)] 
Build TACACS+ dictionary header too

5 years agoRevert "allow for now limits on max_requests"
Alan T. DeKok [Tue, 18 Aug 2020 22:22:48 +0000 (18:22 -0400)] 
Revert "allow for now limits on max_requests"

This reverts commit eaeb4f6f4e77665bb19fc2831e720c54aebbb59f.

seems to break things.

5 years agoconst'ify compile_list
Alan T. DeKok [Tue, 18 Aug 2020 19:36:45 +0000 (15:36 -0400)] 
const'ify compile_list

5 years agoadded IP pool methods
Alan T. DeKok [Tue, 18 Aug 2020 19:35:48 +0000 (15:35 -0400)] 
added IP pool methods

so that on "discover", we can call "ippool allocate", etc.

5 years agoconst'ify virtual_server_method_t
Alan T. DeKok [Tue, 18 Aug 2020 19:34:26 +0000 (15:34 -0400)] 
const'ify virtual_server_method_t

5 years agoallow for now limits on max_requests
Alan T. DeKok [Tue, 18 Aug 2020 19:18:37 +0000 (15:18 -0400)] 
allow for now limits on max_requests

5 years agolower max_requests for worker.
Alan T. DeKok [Tue, 18 Aug 2020 18:45:27 +0000 (14:45 -0400)] 
lower max_requests for worker.

1^20 is probably too high for a minimum

5 years agomake sure that variable is initialized
Alan T. DeKok [Tue, 18 Aug 2020 14:28:57 +0000 (10:28 -0400)] 
make sure that variable is initialized

5 years agoupdate docs for max_requests
Alan T. DeKok [Tue, 18 Aug 2020 14:04:32 +0000 (10:04 -0400)] 
update docs for max_requests

5 years agoset "max_requests" for network and worker
Alan T. DeKok [Tue, 18 Aug 2020 14:02:23 +0000 (10:02 -0400)] 
set "max_requests" for network and worker

and "max_request_time" for worker

5 years agore-add "max_requests" as a global parameter
Alan T. DeKok [Tue, 18 Aug 2020 14:02:07 +0000 (10:02 -0400)] 
re-add "max_requests" as a global parameter

5 years agotypo
Alan T. DeKok [Tue, 18 Aug 2020 14:01:58 +0000 (10:01 -0400)] 
typo

5 years agoadd network and worker config to schedule config
Alan T. DeKok [Tue, 18 Aug 2020 13:44:29 +0000 (09:44 -0400)] 
add network and worker config to schedule config

and pass to network / worker

5 years agomove include so that typedefs are defined before usage
Alan T. DeKok [Tue, 18 Aug 2020 13:43:50 +0000 (09:43 -0400)] 
move include so that typedefs are defined before usage

because server/module.h includes io/schedule.h, which may
eventually include worker.h

5 years agocreate and use fr_network_config_t
Alan T. DeKok [Tue, 18 Aug 2020 13:26:14 +0000 (09:26 -0400)] 
create and use fr_network_config_t

for max_outstanding, which mirrors max_queue_size in v3.

For now, if we try to send a packet to a worker and it's too busy,
we just drop the packet.  i.e. we don't try to send it to another
worker.

The configuration option is also not set, as the config parsing
isn't yet plumbed in.

5 years agomark the message "done" if we didn't send it to the worker
Alan T. DeKok [Tue, 18 Aug 2020 13:11:35 +0000 (09:11 -0400)] 
mark the message "done" if we didn't send it to the worker

5 years agomanual port fix from v3.0.x
Alan T. DeKok [Tue, 18 Aug 2020 12:55:40 +0000 (08:55 -0400)] 
manual port fix from v3.0.x

5 years agoremove free list for fr_io_track_t.
Alan T. DeKok [Mon, 17 Aug 2020 23:02:05 +0000 (19:02 -0400)] 
remove free list for fr_io_track_t.

there are unresolved issues, and the free list makes it more
difficult to track them down

5 years agotry to track down random failures in travis
Alan T. DeKok [Mon, 17 Aug 2020 21:56:14 +0000 (17:56 -0400)] 
try to track down random failures in travis

5 years agominor cleanups and remove @todo which has been done
Alan T. DeKok [Mon, 17 Aug 2020 20:17:59 +0000 (16:17 -0400)] 
minor cleanups and remove @todo which has been done

5 years agofix error message
Alan T. DeKok [Mon, 17 Aug 2020 20:17:50 +0000 (16:17 -0400)] 
fix error message

5 years agoAdd MS-SQL Server DHCP schema and queries
Nick Porter [Mon, 17 Aug 2020 12:33:17 +0000 (13:33 +0100)] 
Add MS-SQL Server DHCP schema and queries

5 years agoUpdate DHCP queries to take advantage of allocate_existing
Nick Porter [Mon, 17 Aug 2020 09:50:28 +0000 (10:50 +0100)] 
Update DHCP queries to take advantage of allocate_existing

5 years agogitignore: We don't need src/bin/fuzzer_tacacs.mk (#3575)
Jorge Pereira [Mon, 17 Aug 2020 19:39:50 +0000 (16:39 -0300)] 
gitignore: We don't need src/bin/fuzzer_tacacs.mk (#3575)