]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
8 years agoNot needed
Arran Cudbard-Bell [Wed, 28 Mar 2018 19:13:43 +0000 (20:13 +0100)] 
Not needed

8 years agoMore conversions
Arran Cudbard-Bell [Wed, 28 Mar 2018 18:55:15 +0000 (19:55 +0100)] 
More conversions

8 years agoMissing uint32_t?
Arran Cudbard-Bell [Wed, 28 Mar 2018 18:44:39 +0000 (19:44 +0100)] 
Missing uint32_t?

8 years agoTalloc type safety for rbtree
Arran Cudbard-Bell [Wed, 28 Mar 2018 18:41:16 +0000 (19:41 +0100)] 
Talloc type safety for rbtree

8 years agoCheck the type of talloced heap elements
Arran Cudbard-Bell [Wed, 28 Mar 2018 15:52:13 +0000 (16:52 +0100)] 
Check the type of talloced heap elements

8 years agoA heap size of INT32_MAX elements is OK
Arran Cudbard-Bell [Wed, 28 Mar 2018 15:51:41 +0000 (16:51 +0100)] 
A heap size of INT32_MAX elements is OK

8 years agoMore type fixes
Arran Cudbard-Bell [Wed, 28 Mar 2018 15:45:02 +0000 (16:45 +0100)] 
More type fixes

8 years agoCheck for overflow when expanding
Arran Cudbard-Bell [Wed, 28 Mar 2018 15:28:56 +0000 (16:28 +0100)] 
Check for overflow when expanding

Provide errors
Check for realloc failure
More type fixes
Formatting

8 years agoallow moving of only one packet
Alan T. DeKok [Wed, 28 Mar 2018 15:00:46 +0000 (11:00 -0400)] 
allow moving of only one packet

8 years agolook up address, not AF. And print descriptive message
Alan T. DeKok [Wed, 28 Mar 2018 14:58:17 +0000 (10:58 -0400)] 
look up address, not AF.  And print descriptive message

8 years agoChange how fr_heap_create is called to allow talloc type validation
Arran Cudbard-Bell [Wed, 28 Mar 2018 14:48:46 +0000 (15:48 +0100)] 
Change how fr_heap_create is called to allow talloc type validation

8 years agomake heap_id be int32_t
Alan T. DeKok [Wed, 28 Mar 2018 14:16:46 +0000 (10:16 -0400)] 
make heap_id be int32_t

8 years agoclean up dynamic client expiry
Alan T. DeKok [Tue, 27 Mar 2018 19:03:38 +0000 (15:03 -0400)] 
clean up dynamic client expiry

- we now have idle_timeout, not lifetime
  - this is because dynamic clients can't be connected (for now)
- simplify and unify the "clean up packet" code
- don't have an "expired" flag in the socket.
- don't have an "expired" flag in the client.
- track client->outstanding only for dynamic clients
- decrement client->outstanding only when the packet is cleaned up

8 years agoAdd heap_id field to fr_pool_connection
Arran Cudbard-Bell [Wed, 28 Mar 2018 10:57:00 +0000 (11:57 +0100)] 
Add heap_id field to fr_pool_connection

8 years agoTake offset of correct structure for connection pool last_released/reserved_cmp
Arran Cudbard-Bell [Wed, 28 Mar 2018 10:45:59 +0000 (11:45 +0100)] 
Take offset of correct structure for connection pool last_released/reserved_cmp

8 years agoMake sure the field storing the heap_id agrees with the rest of the heap code
Arran Cudbard-Bell [Wed, 28 Mar 2018 10:45:34 +0000 (11:45 +0100)] 
Make sure the field storing the heap_id agrees with the rest of the heap code

8 years agoDeal with error writing the delimiter
Arran Cudbard-Bell [Tue, 27 Mar 2018 18:18:06 +0000 (19:18 +0100)] 
Deal with error writing the delimiter

8 years agostop gcc 7 complaining
Arran Cudbard-Bell [Tue, 27 Mar 2018 16:06:43 +0000 (17:06 +0100)] 
stop gcc 7 complaining

8 years agoc_rehash the correct dir, and do the same for ecc certs
Arran Cudbard-Bell [Tue, 27 Mar 2018 15:23:41 +0000 (16:23 +0100)] 
c_rehash the correct dir, and do the same for ecc certs

8 years agoUse GCC7
Arran Cudbard-Bell [Tue, 27 Mar 2018 15:16:38 +0000 (16:16 +0100)] 
Use GCC7

8 years agodocument --allow-mschapv2
Alan T. DeKok [Tue, 27 Mar 2018 12:22:37 +0000 (08:22 -0400)] 
document --allow-mschapv2

8 years agoexpand the *unescaped* string, not the raw `...` string.
Alan T. DeKok [Tue, 27 Mar 2018 13:14:28 +0000 (09:14 -0400)] 
expand the *unescaped* string, not the raw `...` string.

Manual port of commit 5f8d05da

8 years agoEnsure -Wimplicit-fallthrough is enabled
Arran Cudbard-Bell [Tue, 27 Mar 2018 11:22:26 +0000 (12:22 +0100)] 
Ensure -Wimplicit-fallthrough is enabled

8 years agoFormatting
Arran Cudbard-Bell [Mon, 26 Mar 2018 13:09:55 +0000 (14:09 +0100)] 
Formatting

8 years agoMerge pull request #2200 from nchaigne/4.0.x-201803-dhcp-fixes
Alan DeKok [Mon, 26 Mar 2018 18:31:01 +0000 (14:31 -0400)] 
Merge pull request #2200 from nchaigne/4.0.x-201803-dhcp-fixes

A few fixes in fr_dhcpv4_packet_decode

8 years agoA few fixes in fr_dhcpv4_packet_decode 2200/head
nchaigne [Mon, 26 Mar 2018 18:24:44 +0000 (20:24 +0200)] 
A few fixes in fr_dhcpv4_packet_decode

1) Options 26 and 57 are short => use vp_uint16

2) Field "opcode" is byte => use vp_uint8

3) Value 3 does not exist for field "Opcode". Client request is 1.
Option 63 should have been 60 (Vendor Class Identifier).
That said, I don't think this "MSFT 98" code ever worked - unless MS does some really weird stuff with DHCP. So maybe it's worth considering removing this altogether ? I'll let you decide. :)

8 years agoadd missing "break"
Alan T. DeKok [Mon, 26 Mar 2018 18:09:33 +0000 (14:09 -0400)] 
add missing "break"

8 years agoadd missing "break"
Alan T. DeKok [Mon, 26 Mar 2018 18:08:02 +0000 (14:08 -0400)] 
add missing "break"

8 years agoadd missing "breaks"
Alan T. DeKok [Mon, 26 Mar 2018 18:07:36 +0000 (14:07 -0400)] 
add missing "breaks"

8 years agoAdd the client's TLS alert number as an attribute
Arran Cudbard-Bell [Mon, 26 Mar 2018 13:00:19 +0000 (14:00 +0100)] 
Add the client's TLS alert number as an attribute

8 years agoFail if we can't parse the virtual servers
Arran Cudbard-Bell [Mon, 26 Mar 2018 11:32:32 +0000 (12:32 +0100)] 
Fail if we can't parse the virtual servers

8 years agoNew line
Arran Cudbard-Bell [Sun, 25 Mar 2018 09:22:13 +0000 (10:22 +0100)] 
New line

8 years agoSet string encoding in ocsp.cnf too
Arran Cudbard-Bell [Sun, 25 Mar 2018 09:21:10 +0000 (10:21 +0100)] 
Set string encoding in ocsp.cnf too

8 years agoFix leak in unit_test_attribute
Arran Cudbard-Bell [Sun, 25 Mar 2018 09:20:16 +0000 (10:20 +0100)] 
Fix leak in unit_test_attribute

8 years agoDon't strip the first letter from the cipher description
Arran Cudbard-Bell [Sun, 25 Mar 2018 08:46:24 +0000 (09:46 +0100)] 
Don't strip the first letter from the cipher description

8 years agoCorrectly nul-terminated empty strings have length 1
Matthew Newton [Sat, 24 Mar 2018 23:59:14 +0000 (23:59 +0000)] 
Correctly nul-terminated empty strings have length 1

This would trip up regex compares where the subcapture didn't
match anything, so had length 0. Then trying to assign it to an
attribute the RHS was FR_TYPE_INVALID as fr_value_box_strsteal
exited early and never set it to FR_TYPE_STRING.

8 years agoset string_mask to utf8.
Alan T. DeKok [Sun, 25 Mar 2018 00:08:56 +0000 (20:08 -0400)] 
set string_mask to utf8.

OSX uses "nombstr", which is non-UTF8.  That's not what we want.

8 years agogenerate ecc and rsa. Update Makefile to match.
Alan T. DeKok [Sat, 24 Mar 2018 21:20:49 +0000 (17:20 -0400)] 
generate ecc and rsa.  Update Makefile to match.

8 years agothis isn't needed
Alan T. DeKok [Sat, 24 Mar 2018 21:20:07 +0000 (17:20 -0400)] 
this isn't needed

8 years agotypo
Alan T. DeKok [Sat, 24 Mar 2018 19:55:35 +0000 (15:55 -0400)] 
typo

8 years agoPrint index starting at zero
Arran Cudbard-Bell [Sat, 24 Mar 2018 21:17:46 +0000 (21:17 +0000)] 
Print index starting at zero

8 years agoDisplay cipher list and priority at dbg lvl 3
Arran Cudbard-Bell [Sat, 24 Mar 2018 21:15:59 +0000 (21:15 +0000)] 
Display cipher list and priority at dbg lvl 3

It's nice to know what cipher suites are actually in use

8 years agoCheck that there are some virtual servers defined
Arran Cudbard-Bell [Sat, 24 Mar 2018 20:06:56 +0000 (20:06 +0000)] 
Check that there are some virtual servers defined

8 years agoDon't allocate defaults with name2 if its the magic wildcard value
Arran Cudbard-Bell [Sat, 24 Mar 2018 20:06:36 +0000 (20:06 +0000)] 
Don't allocate defaults with name2 if its the magic wildcard value

8 years agomake certs/{rsa,ecc}/ directories, too.
Alan T. DeKok [Sat, 24 Mar 2018 18:35:46 +0000 (14:35 -0400)] 
make certs/{rsa,ecc}/ directories, too.

Both for raddb and src/tests

8 years agoclean ups
Alan T. DeKok [Sat, 24 Mar 2018 18:34:26 +0000 (14:34 -0400)] 
clean ups

.PHONY needs a target.  Intemermediate targets should be
directories, and not phony targets.

8 years agotv_usec / 1000 will always fit within "int"
Alan T. DeKok [Sat, 24 Mar 2018 18:26:59 +0000 (14:26 -0400)] 
tv_usec / 1000 will always fit within "int"

8 years agoiline number is not order.
Alan T. DeKok [Sat, 24 Mar 2018 17:50:02 +0000 (13:50 -0400)] 
iline number is not order.

The "users" file may have multiple $INCLUDES.
We DON'T want a "user" entry at line 266 of "$INCLUDE 1" to conflict
with a "DEFAULT" entry at line 266 of "$INCLUDE 2".

So we add an "order", which tracks the entry number.  The "lineno"
is no longer used for ordering comparisons.  Instead, it's only
used for debugging.

Manual port of commit bee85afcc61

8 years agoremove unnecessary variable
Alan T. DeKok [Sat, 24 Mar 2018 17:46:23 +0000 (13:46 -0400)] 
remove unnecessary variable

8 years agoCreate ECC version of all certificates
Arran Cudbard-Bell [Sat, 24 Mar 2018 17:14:03 +0000 (17:14 +0000)] 
Create ECC version of all certificates

8 years agoRevert "Fail if we leak memory (maybe)" - Can't do that until libkqueue is fixed
Arran Cudbard-Bell [Fri, 23 Mar 2018 15:59:26 +0000 (15:59 +0000)] 
Revert "Fail if we leak memory (maybe)" - Can't do that until libkqueue is fixed

This reverts commit c83748c58d77d41748e7407fd73187adfc64aeb0.

8 years agoFail if we leak memory (maybe)
Arran Cudbard-Bell [Fri, 23 Mar 2018 15:29:58 +0000 (15:29 +0000)] 
Fail if we leak memory (maybe)

8 years agoStop the leak checker complaining
Arran Cudbard-Bell [Fri, 23 Mar 2018 15:25:34 +0000 (15:25 +0000)] 
Stop the leak checker complaining

8 years agoSome editors trim trailing whitespace...
Arran Cudbard-Bell [Fri, 23 Mar 2018 15:25:17 +0000 (15:25 +0000)] 
Some editors trim trailing whitespace...

8 years agoRegression tests for list existence
Arran Cudbard-Bell [Fri, 23 Mar 2018 14:43:04 +0000 (14:43 +0000)] 
Regression tests for list existence

8 years agoFix memory leaks in xlat fmt parsing and map processor registration
Arran Cudbard-Bell [Fri, 23 Mar 2018 14:33:35 +0000 (14:33 +0000)] 
Fix memory leaks in xlat fmt parsing and map processor registration

8 years agoFix leak in module_find_with_method
Arran Cudbard-Bell [Fri, 23 Mar 2018 13:58:34 +0000 (13:58 +0000)] 
Fix leak in module_find_with_method

8 years agoFix some debug messages in fr_worker_get_request
Arran Cudbard-Bell [Fri, 23 Mar 2018 13:42:50 +0000 (13:42 +0000)] 
Fix some debug messages in fr_worker_get_request

8 years ago*actually* deregister all the xlat functions when the tree is freed
Arran Cudbard-Bell [Fri, 23 Mar 2018 13:40:46 +0000 (13:40 +0000)] 
*actually* deregister all the xlat functions when the tree is freed

8 years agoOne set of LSAN_OPTIONS...
Arran Cudbard-Bell [Fri, 23 Mar 2018 11:12:45 +0000 (11:12 +0000)] 
One set of LSAN_OPTIONS...

8 years agoBad tab
Arran Cudbard-Bell [Fri, 23 Mar 2018 11:11:52 +0000 (11:11 +0000)] 
Bad tab

8 years agoTry and get more malloc ctx info
Arran Cudbard-Bell [Thu, 22 Mar 2018 20:58:42 +0000 (20:58 +0000)] 
Try and get more malloc ctx info

8 years agoMore address sanitizer flags
Arran Cudbard-Bell [Thu, 22 Mar 2018 20:56:57 +0000 (20:56 +0000)] 
More address sanitizer flags

8 years agoreopen if we can't stat it
Alan T. DeKok [Thu, 22 Mar 2018 12:25:28 +0000 (08:25 -0400)] 
reopen if we can't stat it

8 years agoremove junk files
Matthew Newton [Thu, 22 Mar 2018 00:29:46 +0000 (00:29 +0000)] 
remove junk files

8 years agoWhen TMPL_TYPE_LIST, vpt->tmpl_da is NULL if the list is empty
Matthew Newton [Wed, 21 Mar 2018 23:27:07 +0000 (23:27 +0000)] 
When TMPL_TYPE_LIST, vpt->tmpl_da is NULL if the list is empty

8 years agoMicroseconds part can be 0 to 999999 so 32bits is fine
Matthew Newton [Wed, 21 Mar 2018 14:20:34 +0000 (09:20 -0500)] 
Microseconds part can be 0 to 999999 so 32bits is fine

8 years agos/FR_TYPE_INT8/FR_TYPE_UINT8/g
Arran Cudbard-Bell [Wed, 21 Mar 2018 13:52:02 +0000 (13:52 +0000)] 
s/FR_TYPE_INT8/FR_TYPE_UINT8/g

8 years agoPrint system error on localtime_r/gtime_failure
Arran Cudbard-Bell [Wed, 21 Mar 2018 13:50:13 +0000 (13:50 +0000)] 
Print system error on localtime_r/gtime_failure

8 years agoUse string not array so we don't expand random junk
Matthew Newton [Wed, 21 Mar 2018 12:34:51 +0000 (07:34 -0500)] 
Use string not array so we don't expand random junk

8 years agoTidy code into a slightly neater order
Matthew Newton [Wed, 21 Mar 2018 11:52:50 +0000 (06:52 -0500)] 
Tidy code into a slightly neater order

8 years agoBeing consistent is nice whether numbers or strings
Matthew Newton [Wed, 21 Mar 2018 11:44:34 +0000 (06:44 -0500)] 
Being consistent is nice whether numbers or strings

8 years agoIf values need to be zero padded they should be fed into the padding expansions
Arran Cudbard-Bell [Wed, 21 Mar 2018 08:34:21 +0000 (08:34 +0000)] 
If values need to be zero padded they should be fed into the padding expansions

It's not ok to mess with the underlying data type just to get a particular presentation format.

The whole point of reworking the xlat code to take discreet boxed values is that upstream consumers of the output can use real types to make proper casting and comparison decisions.

By forcing these values to strings there's a high chance that they'll be fed into a lexicographic comparison function instead of the server just using integer comparisons (they would be now anyway, but we're moving towards something better).

8 years agogive rlm_date ability to return request/now time in different formats
Matthew Newton [Tue, 20 Mar 2018 23:57:31 +0000 (18:57 -0500)] 
give rlm_date ability to return request/now time in different formats

8 years agorlm_date: separate logic from encoding/conversion
Matthew Newton [Tue, 20 Mar 2018 23:12:37 +0000 (18:12 -0500)] 
rlm_date: separate logic from encoding/conversion

and get rid of all the gotos in the process

8 years agoadd utc option to rlm_date
Matthew Newton [Tue, 20 Mar 2018 18:53:54 +0000 (13:53 -0500)] 
add utc option to rlm_date

8 years agoTidy time expansions
Matthew Newton [Tue, 20 Mar 2018 17:02:01 +0000 (12:02 -0500)] 
Tidy time expansions

Make it easier to produce dates in particular formats by always
using fixed length strings; add ISO format; fix milliseconds.

What was %T is now %S.%M (or %S.000000 to be exact...)

8 years agoMerge pull request #2198 from nchaigne/4.0.x-201803-dhcp-encode
Arran Cudbard-Bell [Tue, 20 Mar 2018 18:05:39 +0000 (18:05 +0000)] 
Merge pull request #2198 from nchaigne/4.0.x-201803-dhcp-encode

Do not encode htype and hlen by default for DHCPv4

8 years agoDo not encode htype and hlen by default for DHCPv4 2198/head
nchaigne [Tue, 20 Mar 2018 17:36:41 +0000 (18:36 +0100)] 
Do not encode htype and hlen by default for DHCPv4

DHCP fields "htype" and "hlen" should not be encoded to 1 and 6 (respectively) by default.
They don't need to, because they are automatically set if there is an Ethernet address in field "chaddr".

For a Lease Query request, as described in RFC 4388, it is possible to query: 1) by IP address, 2) by MAC address, 3) by Client-identifier option.
In cases 1) and 3) "The values of htype, hlen, and chaddr MUST be set to zero.".

So I think that if no "chaddr" is provided, it's better to leave "htype" and "hlen" to 0.

This proposed pull request implements this change.

8 years agoRemove '.' from dictionary names, in preparation for marking it as an disallowed...
Arran Cudbard-Bell [Tue, 20 Mar 2018 09:38:35 +0000 (09:38 +0000)] 
Remove '.' from dictionary names, in preparation for marking it as an disallowed character.

8 years agoRemove invalid assert
Arran Cudbard-Bell [Tue, 20 Mar 2018 08:53:09 +0000 (08:53 +0000)] 
Remove invalid assert

8 years agoTypo
Arran Cudbard-Bell [Tue, 20 Mar 2018 08:48:47 +0000 (08:48 +0000)] 
Typo

8 years agodon't stat meaningless data off the end of the list
Matthew Newton [Mon, 19 Mar 2018 22:50:46 +0000 (22:50 +0000)] 
don't stat meaningless data off the end of the list

8 years agoBoth referencer and referencee must be TLVs
Arran Cudbard-Bell [Mon, 19 Mar 2018 14:23:32 +0000 (14:23 +0000)] 
Both referencer and referencee must be TLVs

8 years agoDoxygen
Arran Cudbard-Bell [Mon, 19 Mar 2018 14:09:28 +0000 (14:09 +0000)] 
Doxygen

8 years agoAdd missing INTERNAL_IF_NULL
Arran Cudbard-Bell [Mon, 19 Mar 2018 14:08:03 +0000 (14:08 +0000)] 
Add missing INTERNAL_IF_NULL

8 years agoDoxygen
Arran Cudbard-Bell [Mon, 19 Mar 2018 11:58:14 +0000 (11:58 +0000)] 
Doxygen

8 years agoPENs are explicitly 32bit
Arran Cudbard-Bell [Mon, 19 Mar 2018 11:53:26 +0000 (11:53 +0000)] 
PENs are explicitly 32bit

8 years agos/vendorpec/pen/g
Arran Cudbard-Bell [Mon, 19 Mar 2018 11:44:22 +0000 (11:44 +0000)] 
s/vendorpec/pen/g

It's Private Enterprise Number (now?)

8 years agoReorganise dict.c
Arran Cudbard-Bell [Mon, 19 Mar 2018 11:23:41 +0000 (11:23 +0000)] 
Reorganise dict.c

8 years agoclang scan
Arran Cudbard-Bell [Mon, 19 Mar 2018 10:55:55 +0000 (10:55 +0000)] 
clang scan

8 years agoReorganise attribute adding/validation functions and add support for internal diction...
Arran Cudbard-Bell [Mon, 19 Mar 2018 10:52:33 +0000 (10:52 +0000)] 
Reorganise attribute adding/validation functions and add support for internal dictionary references.

References allow one attribute to internally reference another TLV or a dictionary root.

This allows us to create "group" attributes which allow any attribute to be encoded within the group and foreign protocol attributes which allow RADIUS to be encoded within DHCP (for example).

Attribute references are also needed to mix protocols in the same virtual server, as the template validation functions can retrieve the foreign dictionary context from the talloc hierarchy.

8 years agoInline some string format functions
Arran Cudbard-Bell [Sun, 18 Mar 2018 20:11:05 +0000 (20:11 +0000)] 
Inline some string format functions

8 years agoDoxygen
Arran Cudbard-Bell [Sat, 17 Mar 2018 22:32:14 +0000 (22:32 +0000)] 
Doxygen

8 years agoRe-order dictionary functions
Arran Cudbard-Bell [Sat, 17 Mar 2018 22:21:31 +0000 (22:21 +0000)] 
Re-order dictionary functions

8 years agoStrip global prefix from internal dict.c functions
Arran Cudbard-Bell [Sat, 17 Mar 2018 22:04:55 +0000 (22:04 +0000)] 
Strip global prefix from internal dict.c functions

8 years agofr_dict_print_attr_oid is a public function
Arran Cudbard-Bell [Sat, 17 Mar 2018 21:55:36 +0000 (21:55 +0000)] 
fr_dict_print_attr_oid is a public function

8 years agoRemove duplicate declaration
Arran Cudbard-Bell [Sat, 17 Mar 2018 21:53:17 +0000 (21:53 +0000)] 
Remove duplicate declaration

8 years agoAdd protocol dictionary load functions
Arran Cudbard-Bell [Sat, 17 Mar 2018 21:27:10 +0000 (21:27 +0000)] 
Add protocol dictionary load functions

8 years agoFix scan warnings
Arran Cudbard-Bell [Sat, 17 Mar 2018 20:34:26 +0000 (20:34 +0000)] 
Fix scan warnings