]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Mon, 24 Aug 2020 18:31:02 +0000 (14:31 -0400)]
fix use of packet names. Fixes #3593
Alan T. DeKok [Mon, 24 Aug 2020 17:44:12 +0000 (13:44 -0400)]
handle tmpl && multi
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
Alan T. DeKok [Mon, 24 Aug 2020 15:42:17 +0000 (11:42 -0400)]
rename function for clarity
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
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
Jorge Pereira [Mon, 24 Aug 2020 15:36:07 +0000 (12:36 -0300)]
tacas: Fix TACACS-Data decode
Jorge Pereira [Mon, 24 Aug 2020 15:16:07 +0000 (12:16 -0300)]
tacacs: Fix fr_pair_afrom_da() use in mod_process()
Alan T. DeKok [Mon, 24 Aug 2020 12:46:32 +0000 (08:46 -0400)]
check for encrypted user names here, too
Alan T. DeKok [Mon, 24 Aug 2020 12:43:10 +0000 (08:43 -0400)]
check string, not character
Alan T. DeKok [Mon, 24 Aug 2020 12:14:46 +0000 (08:14 -0400)]
add proto_tacacs_autz
Alan T. DeKok [Mon, 24 Aug 2020 12:06:06 +0000 (08:06 -0400)]
use standard API for length of UTF8 string
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.
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
Alan T. DeKok [Sun, 23 Aug 2020 20:38:29 +0000 (16:38 -0400)]
update comments
Alan T. DeKok [Sun, 23 Aug 2020 15:43:57 +0000 (11:43 -0400)]
remove unused variables
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.
Matthew Newton [Mon, 24 Aug 2020 01:25:16 +0000 (02:25 +0100)]
rpm spec: ensure libcurl version
Might as well fail early
Matthew Newton [Sun, 23 Aug 2020 23:11:26 +0000 (00:11 +0100)]
rlm_sigtran: fix a few warnings
Matthew Newton [Sun, 23 Aug 2020 16:41:39 +0000 (17:41 +0100)]
Two args, not three; the type is found automatically
Arran Cudbard-Bell [Sun, 23 Aug 2020 03:13:09 +0000 (22:13 -0500)]
talloc: Add macro for iterating over arrays
Arran Cudbard-Bell [Fri, 21 Aug 2020 23:09:01 +0000 (18:09 -0500)]
Formatting
Matthew Newton [Sat, 22 Aug 2020 23:54:36 +0000 (00:54 +0100)]
rlm_sigtran: thread instance struct
Matthew Newton [Sat, 22 Aug 2020 23:29:57 +0000 (00:29 +0100)]
rlm_sigtran: fr_dict_t should be const
Alan T. DeKok [Sat, 22 Aug 2020 16:32:25 +0000 (12:32 -0400)]
separate connected and unconnected socket tracking trees
Alan T. DeKok [Sat, 22 Aug 2020 16:18:31 +0000 (12:18 -0400)]
parent track->ev timer from track, not from client
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.
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
Alan T. DeKok [Sat, 22 Aug 2020 12:35:44 +0000 (08:35 -0400)]
free temporary da
Alan T. DeKok [Sat, 22 Aug 2020 12:35:16 +0000 (08:35 -0400)]
clear flags on unknown DAs
Alan T. DeKok [Sat, 22 Aug 2020 12:34:42 +0000 (08:34 -0400)]
TACACS-Data is now 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
Jorge Pereira [Fri, 21 Aug 2020 20:57:02 +0000 (17:57 -0300)]
tacacs: The TACACS-Data should be 'octets'
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
Alan T. DeKok [Fri, 21 Aug 2020 19:16:44 +0000 (15:16 -0400)]
enforce minimum lengths on CHAP, MS-CHAP, and MS-CHAPv2
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
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...
Alan T. DeKok [Fri, 21 Aug 2020 18:46:19 +0000 (14:46 -0400)]
add names for reply packets, too
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.
Jorge Pereira [Fri, 21 Aug 2020 17:38:12 +0000 (14:38 -0300)]
tacacs: Enable mod_priority_set() function
Alan T. DeKok [Fri, 21 Aug 2020 16:46:23 +0000 (12:46 -0400)]
reset subcs before looping over wildcards
Alan T. DeKok [Thu, 20 Aug 2020 21:54:42 +0000 (17:54 -0400)]
remove unused variable
Alan T. DeKok [Thu, 20 Aug 2020 21:54:09 +0000 (17:54 -0400)]
ensure things are initialized
Alan T. DeKok [Thu, 20 Aug 2020 20:58:17 +0000 (16:58 -0400)]
implement checks in draft Section 5.2
Alan T. DeKok [Thu, 20 Aug 2020 20:52:00 +0000 (16:52 -0400)]
notes about maximum length
Alan T. DeKok [Thu, 20 Aug 2020 20:34:26 +0000 (16:34 -0400)]
we need this, too
Jorge Pereira [Tue, 11 Aug 2020 23:13:56 +0000 (20:13 -0300)]
tacacs: Update raddb/sites-available/tacacs
Jorge Pereira [Fri, 14 Aug 2020 16:12:13 +0000 (13:12 -0300)]
tacacs: Add TACACS+ protocol module for authentication
Alan T. DeKok [Thu, 20 Aug 2020 14:48:06 +0000 (10:48 -0400)]
minor tweaks
Jorge Pereira [Wed, 19 Aug 2020 16:14:19 +0000 (13:14 -0300)]
master: Remove redundancy
Jorge Pereira [Wed, 19 Aug 2020 16:11:10 +0000 (13:11 -0300)]
master: Lets use talloc_get_type_abort_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
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
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
Alan T. DeKok [Wed, 19 Aug 2020 20:49:06 +0000 (16:49 -0400)]
more hacks to ensure assertions are correct
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.
Jorge Pereira [Wed, 19 Aug 2020 16:05:34 +0000 (13:05 -0300)]
dhcpv6: Fix typo
Alan T. DeKok [Wed, 19 Aug 2020 15:50:06 +0000 (11:50 -0400)]
more asserts to catch random travis failures
Jorge Pereira [Wed, 19 Aug 2020 15:37:34 +0000 (12:37 -0300)]
tacacs: Just use the 'data' to extract the payload
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
Alan T. DeKok [Wed, 19 Aug 2020 15:19:02 +0000 (11:19 -0400)]
remove unused variable
Alan T. DeKok [Wed, 19 Aug 2020 15:01:42 +0000 (11:01 -0400)]
use synthetic packet type for dedup
Jorge Pereira [Wed, 19 Aug 2020 14:59:07 +0000 (11:59 -0300)]
tacacs: Fix the priority set
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()
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.
Alan T. DeKok [Wed, 19 Aug 2020 13:41:22 +0000 (09:41 -0400)]
we no longer need to manually add tacacs
Alan T. DeKok [Wed, 19 Aug 2020 13:41:07 +0000 (09:41 -0400)]
use uint32 for consistency with other protocols
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
Jorge Pereira [Tue, 18 Aug 2020 00:48:05 +0000 (21:48 -0300)]
scripts: Add '-s <session_id>' option in scripts/tacacs/tacacs_client
Jorge Pereira [Tue, 11 Aug 2020 22:01:05 +0000 (19:01 -0300)]
scripts: Add TACACS+ client
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.
Alan T. DeKok [Wed, 19 Aug 2020 12:08:25 +0000 (08:08 -0400)]
we only support TACACS+ version 12.0 or 12.1
Alan T. DeKok [Wed, 19 Aug 2020 11:48:21 +0000 (07:48 -0400)]
use authentication continue flags
Alan T. DeKok [Wed, 19 Aug 2020 01:06:04 +0000 (21:06 -0400)]
typo
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
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
Jorge Pereira [Tue, 18 Aug 2020 23:40:40 +0000 (20:40 -0300)]
Build TACACS+ dictionary header too
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.
Alan T. DeKok [Tue, 18 Aug 2020 19:36:45 +0000 (15:36 -0400)]
const'ify compile_list
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.
Alan T. DeKok [Tue, 18 Aug 2020 19:34:26 +0000 (15:34 -0400)]
const'ify virtual_server_method_t
Alan T. DeKok [Tue, 18 Aug 2020 19:18:37 +0000 (15:18 -0400)]
allow for now limits on max_requests
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
Alan T. DeKok [Tue, 18 Aug 2020 14:28:57 +0000 (10:28 -0400)]
make sure that variable is initialized
Alan T. DeKok [Tue, 18 Aug 2020 14:04:32 +0000 (10:04 -0400)]
update docs for max_requests
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
Alan T. DeKok [Tue, 18 Aug 2020 14:02:07 +0000 (10:02 -0400)]
re-add "max_requests" as a global parameter
Alan T. DeKok [Tue, 18 Aug 2020 14:01:58 +0000 (10:01 -0400)]
typo
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
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
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.
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
Alan T. DeKok [Tue, 18 Aug 2020 12:55:40 +0000 (08:55 -0400)]
manual port fix from v3.0.x
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
Alan T. DeKok [Mon, 17 Aug 2020 21:56:14 +0000 (17:56 -0400)]
try to track down random failures in travis
Alan T. DeKok [Mon, 17 Aug 2020 20:17:59 +0000 (16:17 -0400)]
minor cleanups and remove @todo which has been done
Alan T. DeKok [Mon, 17 Aug 2020 20:17:50 +0000 (16:17 -0400)]
fix error message
Nick Porter [Mon, 17 Aug 2020 12:33:17 +0000 (13:33 +0100)]
Add MS-SQL Server DHCP schema and queries
Nick Porter [Mon, 17 Aug 2020 09:50:28 +0000 (10:50 +0100)]
Update DHCP queries to take advantage of allocate_existing
Jorge Pereira [Mon, 17 Aug 2020 19:39:50 +0000 (16:39 -0300)]
gitignore: We don't need src/bin/fuzzer_tacacs.mk (#3575)