freeradius.git
9 years agoPull checks from master
Alan T. DeKok [Wed, 4 Jun 2014 21:06:41 +0000 (17:06 -0400)]
Pull checks from master

If we're checking the config, don't create the packet lists

9 years agoMake DEBUG_STATE_MACHINE print out usec timestamps
Alan T. DeKok [Wed, 4 Jun 2014 21:04:52 +0000 (17:04 -0400)]
Make DEBUG_STATE_MACHINE print out usec timestamps

9 years agoCheck for htonll and htonlll (you never know)
Arran Cudbard-Bell [Wed, 4 Jun 2014 20:38:42 +0000 (21:38 +0100)]
Check for htonll and htonlll (you never know)

Use __builtin_bswap64 is htonll is not available

9 years agoAdd check for bswap64
Arran Cudbard-Bell [Wed, 4 Jun 2014 20:17:16 +0000 (21:17 +0100)]
Add check for bswap64

9 years agoTweak builtin checks
Arran Cudbard-Bell [Wed, 4 Jun 2014 20:16:51 +0000 (21:16 +0100)]
Tweak builtin checks

9 years agoFix invalid assert and paircmp check
Arran Cudbard-Bell [Wed, 4 Jun 2014 19:27:50 +0000 (20:27 +0100)]
Fix invalid assert and paircmp check

9 years agoMore talloc_steal
Alan T. DeKok [Wed, 4 Jun 2014 18:21:12 +0000 (14:21 -0400)]
More talloc_steal

9 years agoAllow no proxy reply. Closes #675
Alan T. DeKok [Wed, 4 Jun 2014 13:23:47 +0000 (09:23 -0400)]
Allow no proxy reply.  Closes #675

For "proxy_tunneled_request_as_eap = no"

9 years agoWe need paircmp to support regexes
Arran Cudbard-Bell [Wed, 4 Jun 2014 17:25:26 +0000 (18:25 +0100)]
We need paircmp to support regexes

9 years agoFixup length when converting xlat VPs back to literals in radclient
Arran Cudbard-Bell [Wed, 4 Jun 2014 15:06:46 +0000 (16:06 +0100)]
Fixup length when converting xlat VPs back to literals in radclient

9 years agoSupport new tag behaviour correctly in pairvalidate
Arran Cudbard-Bell [Wed, 4 Jun 2014 13:48:55 +0000 (14:48 +0100)]
Support new tag behaviour correctly in pairvalidate

9 years agoSimplify pairvalidate loop
Arran Cudbard-Bell [Wed, 4 Jun 2014 13:48:36 +0000 (14:48 +0100)]
Simplify pairvalidate loop

9 years agoAdd assert to pairvalidate_debug to catch when pairvalidate misidentified an attribut...
Arran Cudbard-Bell [Wed, 4 Jun 2014 13:48:13 +0000 (14:48 +0100)]
Add assert to pairvalidate_debug to catch when pairvalidate misidentified an attribute as mismatching

9 years agoFix cosmetic error in pairvalidate_debug
Arran Cudbard-Bell [Wed, 4 Jun 2014 13:47:25 +0000 (14:47 +0100)]
Fix cosmetic error in pairvalidate_debug

9 years agoAdd the proxy reply attributes to the reply. Fixes #675
Alan T. DeKok [Wed, 4 Jun 2014 12:15:25 +0000 (08:15 -0400)]
Add the proxy reply attributes to the reply.  Fixes #675

Don't over-write the reply.  The various EAP functions always
put their attributes into the reply, even when run in the
post-proxy stage

9 years agoSet the reply to CHALLENGE if we're not done
Alan T. DeKok [Wed, 4 Jun 2014 12:14:55 +0000 (08:14 -0400)]
Set the reply to CHALLENGE if we're not done

9 years agoMore talloc_steal <sigh>
Alan T. DeKok [Wed, 4 Jun 2014 11:35:18 +0000 (07:35 -0400)]
More talloc_steal <sigh>

9 years agoUse new syntax
Alan T. DeKok [Wed, 4 Jun 2014 11:22:13 +0000 (07:22 -0400)]
Use new syntax

9 years agoDon't print out name for empty sub-section
Alan T. DeKok [Wed, 4 Jun 2014 11:21:37 +0000 (07:21 -0400)]
Don't print out name for empty sub-section

9 years agoBe more careful with proxy delays. Should help #673
Alan T. DeKok [Tue, 3 Jun 2014 21:24:31 +0000 (17:24 -0400)]
Be more careful with proxy delays.  Should help #673

9 years agoPrint timeouts for requests in debugging mode
Alan T. DeKok [Tue, 3 Jun 2014 14:53:06 +0000 (10:53 -0400)]
Print timeouts for requests in debugging mode

9 years agoWe can't build with openssl sha1 by default
Arran Cudbard-Bell [Tue, 3 Jun 2014 13:56:12 +0000 (14:56 +0100)]
We can't build with openssl sha1 by default

9 years agoresponse_window of zero is OK for clients.
Alan T. DeKok [Tue, 3 Jun 2014 13:29:39 +0000 (09:29 -0400)]
response_window of zero is OK for clients.

It means "use the home server response_window"

9 years agoActually build with OPENSSL_SHA1 instead of just saying we're going to build with it
Arran Cudbard-Bell [Tue, 3 Jun 2014 11:49:10 +0000 (12:49 +0100)]
Actually build with OPENSSL_SHA1 instead of just saying we're going to build with it

9 years agoDon't overload default_log
Arran Cudbard-Bell [Tue, 3 Jun 2014 11:48:40 +0000 (12:48 +0100)]
Don't overload default_log

9 years agoExcept in fips186prf.c
Arran Cudbard-Bell [Tue, 3 Jun 2014 11:36:40 +0000 (12:36 +0100)]
Except in fips186prf.c

9 years agoIt's there because it's used by eapsim_calculate_keys
Arran Cudbard-Bell [Tue, 3 Jun 2014 11:35:43 +0000 (12:35 +0100)]
It's there because it's used by eapsim_calculate_keys

9 years agoDon't overload the logging symbols from libfreeradius-server
Arran Cudbard-Bell [Tue, 3 Jun 2014 11:05:40 +0000 (12:05 +0100)]
Don't overload the logging symbols from libfreeradius-server

Remove the dumb hacks in radeapclient.c and call the proper log initialisation functions. Seeing as it's linked against libfreeradius-server now we may as well use them.

9 years agoFormatting
Arran Cudbard-Bell [Tue, 3 Jun 2014 00:08:32 +0000 (01:08 +0100)]
Formatting

9 years agoCache-TTL should now be signed
Arran Cudbard-Bell [Mon, 2 Jun 2014 19:22:25 +0000 (20:22 +0100)]
Cache-TTL should now be signed

9 years agoProcess and consume all Response-Packet-Type and Packet-Type attribute in radclient...
Arran Cudbard-Bell [Mon, 2 Jun 2014 17:39:35 +0000 (18:39 +0100)]
Process and consume all Response-Packet-Type and Packet-Type attribute in radclient filters

9 years agoRemove redundant field in radclient request struct
Arran Cudbard-Bell [Mon, 2 Jun 2014 17:39:05 +0000 (18:39 +0100)]
Remove redundant field in radclient request struct

9 years agoAdd optional Radclient-Test-Name attribute (name is included in any filter error...
Arran Cudbard-Bell [Mon, 2 Jun 2014 17:38:17 +0000 (18:38 +0100)]
Add optional Radclient-Test-Name attribute (name is included in any filter error output)

9 years agoFix debugging verbosity in radclient
Arran Cudbard-Bell [Mon, 2 Jun 2014 16:46:18 +0000 (17:46 +0100)]
Fix debugging verbosity in radclient

9 years agoAllow zero length bodies in REST responses
Arran Cudbard-Bell [Mon, 2 Jun 2014 15:50:11 +0000 (16:50 +0100)]
Allow zero length bodies in REST responses

9 years agoMove all special attribute checks into the loop which iterates over the contents...
Arran Cudbard-Bell [Mon, 2 Jun 2014 11:22:08 +0000 (12:22 +0100)]
Move all special attribute checks into the loop which iterates over the contents of the request list

9 years agoFormatting
Arran Cudbard-Bell [Mon, 2 Jun 2014 11:25:20 +0000 (12:25 +0100)]
Formatting

9 years agoIt's redundant check for server_port as it's value was already set in the packet
Arran Cudbard-Bell [Mon, 2 Jun 2014 11:24:57 +0000 (12:24 +0100)]
It's redundant check for server_port as it's value was already set in the packet

9 years agoAdd comment regarding why we set the destructor for radclient requests so late
Arran Cudbard-Bell [Mon, 2 Jun 2014 11:24:22 +0000 (12:24 +0100)]
Add comment regarding why we set the destructor for radclient requests so late

9 years agoCleanup socket opening failure message
Arran Cudbard-Bell [Mon, 2 Jun 2014 11:23:55 +0000 (12:23 +0100)]
Cleanup socket opening failure message

9 years agoTypo
Arran Cudbard-Bell [Mon, 2 Jun 2014 11:23:26 +0000 (12:23 +0100)]
Typo

9 years agoNot always Accepts and Rejects
Arran Cudbard-Bell [Mon, 2 Jun 2014 11:23:15 +0000 (12:23 +0100)]
Not always Accepts and Rejects

9 years agoFix 'auto' mode. Before responses weren't being matched to requests.
Arran Cudbard-Bell [Mon, 2 Jun 2014 10:34:14 +0000 (11:34 +0100)]
Fix 'auto' mode. Before responses weren't being matched to requests.

9 years agoUse REDEBUG so we know which entry failed parsing
Arran Cudbard-Bell [Mon, 2 Jun 2014 10:32:34 +0000 (11:32 +0100)]
Use REDEBUG so we know which entry failed parsing

9 years agoSkip empty requests (this is closer to previous radclient behaviour)
Arran Cudbard-Bell [Mon, 2 Jun 2014 10:31:03 +0000 (11:31 +0100)]
Skip empty requests (this is closer to previous radclient behaviour)

9 years agoFix assert on error in radclient
Arran Cudbard-Bell [Mon, 2 Jun 2014 08:29:28 +0000 (09:29 +0100)]
Fix assert on error in radclient

9 years agoMore clients.conf cleanup
Arran Cudbard-Bell [Sun, 1 Jun 2014 20:54:26 +0000 (21:54 +0100)]
More clients.conf cleanup

9 years agoMerge cache changes from master release_3_0_4_rc1
Arran Cudbard-Bell [Sun, 1 Jun 2014 18:14:05 +0000 (19:14 +0100)]
Merge cache changes from master

9 years agoRemove all Cache control attributes after each rlm_cache call
Arran Cudbard-Bell [Sun, 1 Jun 2014 11:20:56 +0000 (12:20 +0100)]
Remove all Cache control attributes after each rlm_cache call

9 years agoDon't use Perl
Alan T. DeKok [Sun, 1 Jun 2014 15:02:49 +0000 (11:02 -0400)]
Don't use Perl

9 years agoIgnore attributes.h
Alan T. DeKok [Sun, 1 Jun 2014 14:07:52 +0000 (10:07 -0400)]
Ignore attributes.h

9 years agoFunction naming consistency
Alan T. DeKok [Sun, 1 Jun 2014 14:05:43 +0000 (10:05 -0400)]
Function naming consistency

s/radius_vpt_/radius_tmpl_/g

9 years agoAuto-generate headers from dictionarty.freeradius.internal
Alan T. DeKok [Sun, 1 Jun 2014 13:29:05 +0000 (09:29 -0400)]
Auto-generate headers from dictionarty.freeradius.internal

To avoid future mistakes

9 years agoUse the correct numbers in the dictionary files.
Alan T. DeKok [Sun, 1 Jun 2014 13:02:04 +0000 (09:02 -0400)]
Use the correct numbers in the dictionary files.

The attributes in the file are ordered for a reason, so that
typos like this can't happen.  Having random arrangements of
numbers makes it impossible to track what's going where

9 years agoAdd Cache-Read-Only
Arran Cudbard-Bell [Sun, 1 Jun 2014 11:31:04 +0000 (12:31 +0100)]
Add Cache-Read-Only

9 years agoRenumber FreeRADIUS-Client-Src-IP-Address and FreeRADIUS-Client-Src-IPv6-Address
Arran Cudbard-Bell [Sun, 1 Jun 2014 11:30:38 +0000 (12:30 +0100)]
Renumber FreeRADIUS-Client-Src-IP-Address and FreeRADIUS-Client-Src-IPv6-Address

9 years agoConvert rlm_cache to use map2request
Arran Cudbard-Bell [Sun, 1 Jun 2014 09:12:05 +0000 (10:12 +0100)]
Convert rlm_cache to use map2request

9 years agoFix double & for list references too
Arran Cudbard-Bell [Sun, 1 Jun 2014 11:04:02 +0000 (12:04 +0100)]
Fix double & for list references too

9 years agoRemove unused argument in radius_map2request
Arran Cudbard-Bell [Sun, 1 Jun 2014 08:52:40 +0000 (09:52 +0100)]
Remove unused argument in radius_map2request

10 years agoSkip zero length values in mapping section of rlm_ldap
Arran Cudbard-Bell [Sat, 31 May 2014 16:14:23 +0000 (17:14 +0100)]
Skip zero length values in mapping section of rlm_ldap

10 years agoBetter way of doing wildcards
Arran Cudbard-Bell [Sat, 31 May 2014 14:21:38 +0000 (15:21 +0100)]
Better way of doing wildcards

10 years agoMissed label
Arran Cudbard-Bell [Sat, 31 May 2014 14:08:15 +0000 (15:08 +0100)]
Missed label

10 years agoBetter way of doing IPv4/IPv6 format checking
Arran Cudbard-Bell [Sat, 31 May 2014 12:56:09 +0000 (13:56 +0100)]
Better way of doing IPv4/IPv6 format checking

10 years agoRemove deprecated methods of specifying clients from clients.conf
Arran Cudbard-Bell [Sat, 31 May 2014 11:42:03 +0000 (12:42 +0100)]
Remove deprecated methods of specifying clients from clients.conf

10 years agoRe-enable wildcard clients. The clients.conf had a reference to it working previously...
Arran Cudbard-Bell [Sat, 31 May 2014 12:17:08 +0000 (13:17 +0100)]
Re-enable wildcard clients. The clients.conf had a reference to it working previously, so it must have at some point.

10 years agoMissed check for ipv4addr in clients.c
Arran Cudbard-Bell [Sat, 31 May 2014 11:44:40 +0000 (12:44 +0100)]
Missed check for ipv4addr in clients.c

10 years agoSet prefixes in fr_sockaddr2ipaddr
Arran Cudbard-Bell [Fri, 30 May 2014 22:58:44 +0000 (23:58 +0100)]
Set prefixes in fr_sockaddr2ipaddr

10 years agoNote recent changes
Alan T. DeKok [Sat, 31 May 2014 13:36:06 +0000 (09:36 -0400)]
Note recent changes

10 years agoWhitespace
Alan T. DeKok [Sat, 31 May 2014 13:34:31 +0000 (09:34 -0400)]
Whitespace

10 years agotypos
Alan T. DeKok [Sat, 31 May 2014 13:27:01 +0000 (09:27 -0400)]
typos

10 years agoUse -fPIC for Solaris
Alan T. DeKok [Sat, 31 May 2014 13:26:35 +0000 (09:26 -0400)]
Use -fPIC for Solaris

until we have better C compiler detection.

10 years agoDon't try to resolve IPv6 addresses in fr_pton
Arran Cudbard-Bell [Fri, 30 May 2014 22:05:00 +0000 (23:05 +0100)]
Don't try to resolve IPv6 addresses in fr_pton

10 years agoUpdate warning for clients
Arran Cudbard-Bell [Fri, 30 May 2014 21:28:18 +0000 (22:28 +0100)]
Update warning for clients

10 years agoAdd similar ipaddr, ipv4addr, ipv6addr config items for realms
Arran Cudbard-Bell [Fri, 30 May 2014 21:28:07 +0000 (22:28 +0100)]
Add similar ipaddr, ipv4addr, ipv6addr config items for realms

10 years agoAdd similar ipaddr, ipv4addr, ipv6addr config items for listen sections
Arran Cudbard-Bell [Fri, 30 May 2014 21:18:25 +0000 (22:18 +0100)]
Add similar ipaddr, ipv4addr, ipv6addr config items for listen sections

10 years agoRename PW_TYPE_IP* so they're all consistent
Arran Cudbard-Bell [Fri, 30 May 2014 21:06:14 +0000 (22:06 +0100)]
Rename PW_TYPE_IP* so they're all consistent

10 years agoAdd PW_TYPE_COMBO_IP_PREFIX (conffile parser only)
Arran Cudbard-Bell [Fri, 30 May 2014 20:27:56 +0000 (21:27 +0100)]
Add PW_TYPE_COMBO_IP_PREFIX (conffile parser only)

Change 'ipaddr' to PW_TYPE_COMBO_IP_PREFIX so we can be really lazy about IP formats

10 years agoRename fr_pton functions to fr_pton4, fr_pton6 and fr_pton. fr_pton will resolve...
Arran Cudbard-Bell [Fri, 30 May 2014 19:57:52 +0000 (20:57 +0100)]
Rename fr_pton functions to fr_pton4, fr_pton6 and fr_pton. fr_pton will resolve the IP address to either 4 or 6 based on format and/or available DNS records.

10 years agoUpdate ChangeLog
Arran Cudbard-Bell [Fri, 30 May 2014 17:27:13 +0000 (18:27 +0100)]
Update ChangeLog

10 years agoFix issue where use of FreeRADIUS-Client-IPv6-Prefix and FreeRADIUS-Client-IPv4-Prefi...
Arran Cudbard-Bell [Fri, 30 May 2014 17:17:20 +0000 (18:17 +0100)]
Fix issue where use of FreeRADIUS-Client-IPv6-Prefix and FreeRADIUS-Client-IPv4-Prefix when creating dynamic client entries, would trigger an error.

10 years agoMinor typos in error messages
Arran Cudbard-Bell [Fri, 30 May 2014 17:10:31 +0000 (18:10 +0100)]
Minor typos in error messages

10 years agoSwitch to using fr_ipaddr_t for client prefixes, and allow ipaddr and ipaddr6 config...
Arran Cudbard-Bell [Fri, 30 May 2014 16:46:18 +0000 (17:46 +0100)]
Switch to using fr_ipaddr_t for client prefixes, and allow ipaddr and ipaddr6 config items to be prefixes. Addresses #581.

10 years agoAdd fr_ipaddr_mask to fixup fr_ipaddr_t's by zeroing out the host portion of the...
Arran Cudbard-Bell [Fri, 30 May 2014 16:44:45 +0000 (17:44 +0100)]
Add fr_ipaddr_mask to fixup fr_ipaddr_t's by zeroing out the host portion of the address

10 years agoAdd nonnull hint
Arran Cudbard-Bell [Fri, 30 May 2014 16:16:31 +0000 (17:16 +0100)]
Add nonnull hint

10 years agoAdd fr_ptonx, fr_ntop and is_wildcard IP address functions
Arran Cudbard-Bell [Fri, 30 May 2014 16:16:10 +0000 (17:16 +0100)]
Add fr_ptonx, fr_ntop and is_wildcard IP address functions

10 years agoSimplify masking
Arran Cudbard-Bell [Fri, 30 May 2014 16:14:05 +0000 (17:14 +0100)]
Simplify masking

10 years agoWhitespace changes
Arran Cudbard-Bell [Fri, 30 May 2014 13:14:05 +0000 (14:14 +0100)]
Whitespace changes

10 years agoMerge pull request #672 from spbnick/init_delay_rename_v3.0.x
Alan DeKok [Fri, 30 May 2014 15:05:20 +0000 (11:05 -0400)]
Merge pull request #672 from spbnick/init_delay_rename_v3.0.x

Rename min_response_window to init_delay - v3.0.x

10 years agoRename min_response_window to init_delay
Nikolai Kondrashov [Fri, 30 May 2014 11:29:20 +0000 (14:29 +0300)]
Rename min_response_window to init_delay

Rename main_config's "min_response_window" field to "init_delay", as it
better reflects the usage and because its value won't be related to any
response window in case they're all higher than 1/3 s, which is true
most of the time.

10 years agoAdd FR_TIMEVAL_BOUND_CHECK
Nikolai Kondrashov [Fri, 30 May 2014 09:04:18 +0000 (12:04 +0300)]
Add FR_TIMEVAL_BOUND_CHECK

Add FR_TIMEVAL_BOUND_CHECK implementing bounding for struct
timeval values, similarly to FR_INTEGER_BOUND_CHECK. Use it in
home_server_add and client_parse to increase readability.

10 years agoFix all remaining config items to use FR_CONF_OFFSET
Arran Cudbard-Bell [Fri, 30 May 2014 11:21:31 +0000 (12:21 +0100)]
Fix all remaining config items to use FR_CONF_OFFSET

Add support to the conffile parser for parsing IPv4 addresses in octal and hex format

Add support to conffile parser for parsing prefix type config items

Standardise on using fr_ipaddr_t structures to represent IP addresses in the conffile
code, and other places.

10 years agoBreak out IP parsing into fr_pton and fr_pton6. Any function which needs to parse...
Arran Cudbard-Bell [Thu, 29 May 2014 23:04:54 +0000 (00:04 +0100)]
Break out IP parsing into fr_pton and fr_pton6. Any function which needs to parse IP addresses or IP prefixes in the server should be accommodated by these functions.

10 years agoMore FR_CONF_OFFSET fixups
Alan T. DeKok [Thu, 29 May 2014 17:58:05 +0000 (13:58 -0400)]
More FR_CONF_OFFSET fixups

perl -0777 -p -i -e  's/PW_TYPE_([^,]+),\s+offsetof\(([^,]+),\s*([^,]+)\),\s*0,/FR_CONF_OFFSET(PW_TYPE_$1, $2, $3),/mg' src/main/connection.c

10 years agoMore conversion to FR_CONF_OFFSET
Alan T. DeKok [Thu, 29 May 2014 17:47:49 +0000 (13:47 -0400)]
More conversion to FR_CONF_OFFSET

and fix up the various dependent data types

10 years agoMore conversion to FR_CONF_OFFSET
Alan T. DeKok [Thu, 29 May 2014 17:47:37 +0000 (13:47 -0400)]
More conversion to FR_CONF_OFFSET

10 years agoFix scan error
Arran Cudbard-Bell [Thu, 29 May 2014 17:31:47 +0000 (18:31 +0100)]
Fix scan error

10 years agoReformatting and another enum
Arran Cudbard-Bell [Thu, 29 May 2014 17:19:32 +0000 (18:19 +0100)]
Reformatting and another enum

10 years agoFix Coverity #1216798 #1216797 #1216796 #1216795 #1216794
Arran Cudbard-Bell [Thu, 29 May 2014 17:09:41 +0000 (18:09 +0100)]
Fix Coverity #1216798 #1216797 #1216796 #1216795 #1216794

10 years agotrailing spaces aren't necessary
Alan T. DeKok [Thu, 29 May 2014 16:35:32 +0000 (12:35 -0400)]
trailing spaces aren't necessary

10 years agoMove prefix_ptr to a higher scope
Alan T. DeKok [Thu, 29 May 2014 16:31:17 +0000 (12:31 -0400)]
Move prefix_ptr to a higher scope