Alan T. DeKok [Fri, 23 Dec 2011 14:26:23 +0000 (09:26 -0500)]
Use new dict_valnamebyattr function
Alan T. DeKok [Fri, 23 Dec 2011 14:26:23 +0000 (09:26 -0500)]
Use new dict_valnamebyattr function
Alan T. DeKok [Fri, 23 Dec 2011 14:26:09 +0000 (09:26 -0500)]
Remove unused variable
Alan T. DeKok [Fri, 23 Dec 2011 14:15:53 +0000 (09:15 -0500)]
Added new method to get name of enum from values
This is simpler than having duplicate code throughout the
source.
Alan T. DeKok [Tue, 20 Dec 2011 14:38:22 +0000 (09:38 -0500)]
Initialize authentication vector.
Otherwise proxied packets can have a zero authentication
vector.
Alan T. DeKok [Tue, 20 Dec 2011 13:14:40 +0000 (08:14 -0500)]
Note that "hashsize=0" is a bad idea
Alan T. DeKok [Mon, 19 Dec 2011 20:44:37 +0000 (15:44 -0500)]
Use "last_found" in a thread-safe manner
It's a thread-local variable, not a variable global to the
configuration.
Note also that much of the rest of the module is poor.
Re-reading the files for every packet is HORRIBLE. It causes
more threading issues.
Fixed-size hash tables are similarly poor practice.
Alan T. DeKok [Fri, 16 Dec 2011 18:40:22 +0000 (13:40 -0500)]
As posted to the list
Alan T. DeKok [Tue, 13 Dec 2011 20:07:07 +0000 (21:07 +0100)]
Account for EAP header and EAP-MSCHAPv2 opcode
Found by Matt Dayman.
Alan T. DeKok [Thu, 8 Dec 2011 13:48:55 +0000 (14:48 +0100)]
Added "log { use_utc = yes/no }" configuration
Alan T. DeKok [Sun, 4 Dec 2011 09:00:57 +0000 (10:00 +0100)]
More strlen fixes
Alan T. DeKok [Sun, 4 Dec 2011 08:59:50 +0000 (09:59 +0100)]
More strlen fixes
Alan T. DeKok [Sun, 4 Dec 2011 08:53:52 +0000 (09:53 +0100)]
Fixed bad strlen
Alan T. DeKok [Fri, 2 Dec 2011 16:53:11 +0000 (17:53 +0100)]
More strlen fixes
Alan T. DeKok [Fri, 2 Dec 2011 16:52:11 +0000 (17:52 +0100)]
Replace strlen with more efficient check
Alan T. DeKok [Fri, 2 Dec 2011 16:48:33 +0000 (17:48 +0100)]
Replace strlen with simpler check
Alan T. DeKok [Thu, 1 Dec 2011 13:21:03 +0000 (14:21 +0100)]
Perl clone should be called sequentially, not in parallel.
Adding a mutex fixes this.
Patch from Eike Dehling
Alan T. DeKok [Tue, 29 Nov 2011 19:40:39 +0000 (20:40 +0100)]
Print out real password, not username
Alan T. DeKok [Fri, 2 Dec 2011 16:43:33 +0000 (17:43 +0100)]
Added rad_calloc to mirror rad_malloc
Alan T. DeKok [Tue, 29 Nov 2011 14:15:31 +0000 (15:15 +0100)]
Move timers to macro
So that we can change them later with minimal pain.
And so it's obvious which things are state machine changes,
and which are other logic
Alan T. DeKok [Tue, 29 Nov 2011 11:15:52 +0000 (12:15 +0100)]
Clean up regex code
Convert it to use pairmake_xlat, which is better.
Better ifdef's for regex support.
boot-time check for invalid regular expressions
Alan T. DeKok [Tue, 29 Nov 2011 10:56:25 +0000 (11:56 +0100)]
Move do_xlat=1 code to pairmake_xlat()
This abstracts the xlat code (i.e. integer type needs string)
so that it's easier to fix it later.
Alan T. DeKok [Tue, 29 Nov 2011 10:47:13 +0000 (11:47 +0100)]
Add "tests" target
Alan T. DeKok [Tue, 29 Nov 2011 10:34:04 +0000 (11:34 +0100)]
Partial revert of
b14fc9d3d97811
It turns out that there is just too much code which
rewuires writing to vp->vp_strvalue. The regex comparisons,
xlat expansions, etc. all require the ability to write
strings to integer-type attributes.
We'll see if there's a better way to fix this in the future.
Alan T. DeKok [Tue, 29 Nov 2011 09:04:32 +0000 (10:04 +0100)]
Fixed mutex issues
Alan T. DeKok [Mon, 28 Nov 2011 19:24:21 +0000 (20:24 +0100)]
Fixed typo
Alan T. DeKok [Mon, 28 Nov 2011 17:50:04 +0000 (18:50 +0100)]
More lvalue -> vp_* changes
Alan T. DeKok [Mon, 28 Nov 2011 13:06:47 +0000 (14:06 +0100)]
Clarify names
Alan T. DeKok [Mon, 28 Nov 2011 12:59:34 +0000 (13:59 +0100)]
Wrap state machine functions in STATE_MACHINE_DECL
This makes it clearer which functions are for the state machine
and which aren't. It also lets us later change the state machine
by changing (ideally) only one macro.
Alan T. DeKok [Mon, 28 Nov 2011 12:44:46 +0000 (13:44 +0100)]
Better fix for previous debian bug
Alan T. DeKok [Mon, 28 Nov 2011 12:36:22 +0000 (13:36 +0100)]
nitialize data pointer before setting it
So that if there's an error setting it, we can free it without
the system blowing up.
Closes Debian bug #606450
Alan T. DeKok [Sun, 27 Nov 2011 09:03:43 +0000 (10:03 +0100)]
Remove old text
Because it confuses people who don't read eap.conf, or
the rest of the file.
Alan T. DeKok [Mon, 28 Nov 2011 11:18:50 +0000 (12:18 +0100)]
Added internal fr_connection_find()
To avoid duplicate code
Alan T. DeKok [Mon, 28 Nov 2011 10:45:04 +0000 (11:45 +0100)]
Minor reformatting
Alan T. DeKok [Mon, 28 Nov 2011 10:44:43 +0000 (11:44 +0100)]
Minor reformatting for 80-col widths
Alan T. DeKok [Sun, 27 Nov 2011 09:21:43 +0000 (10:21 +0100)]
Clean up examples
Alan T. DeKok [Sat, 26 Nov 2011 15:08:52 +0000 (16:08 +0100)]
Rearrange packet list code
yank no longer returns a pointer. No one was using it, so that
work was unnecessary.
Re-arrange the code in fr_packet_cmp() so that fewer comparisons
are necessary to disambiiguate packets.
Remove workaround for bug #35 in packet_entry_cmp(). It is
no longer necessary.
The result is a somewhat faster on in-memory performance tests.
But the callgrind output stil lshows large blocks of time
spent handling the packet lists. Those could be optimized
some more.
Alan T. DeKok [Fri, 25 Nov 2011 14:22:36 +0000 (15:22 +0100)]
Pass sizeof buffer to cf_expand_variables
Alan T. DeKok [Fri, 25 Nov 2011 12:04:53 +0000 (13:04 +0100)]
Updated version output
Moved compilation flags output from debug messages. It shouldn't
be there. Move it to version.c, and made it print out the
detailed list of supported functionality when using "-xv"
Alan T. DeKok [Thu, 24 Nov 2011 08:28:24 +0000 (09:28 +0100)]
More quiet builds
Alan T. DeKok [Thu, 24 Nov 2011 07:56:05 +0000 (08:56 +0100)]
Ignore local cache directory
Alan T. DeKok [Thu, 24 Nov 2011 07:55:15 +0000 (08:55 +0100)]
Ignore tar files, sig files, patches
Alan T. DeKok [Thu, 24 Nov 2011 07:53:32 +0000 (08:53 +0100)]
Ignore the doxygen _build directory
Alan T. DeKok [Wed, 23 Nov 2011 13:32:27 +0000 (14:32 +0100)]
Note removal of functionality
Alan T. DeKok [Wed, 23 Nov 2011 13:31:54 +0000 (14:31 +0100)]
Re-arrange structure to remove padding
This saves 8 bytes per VP on a 64-bit machine. That adds up...
Alan T. DeKok [Tue, 22 Nov 2011 17:29:31 +0000 (18:29 +0100)]
Now that no one uses lvalue, delete it.
This shrinks the size of the VALUE_PAIR structure by 256 bytes,
which is very nice.
Alan T. DeKok [Tue, 22 Nov 2011 17:29:06 +0000 (18:29 +0100)]
Don't use lvalue, use the correct struct name
In preparation for removing lvalue.
Alan T. DeKok [Tue, 22 Nov 2011 16:49:02 +0000 (17:49 +0100)]
Shrink the size of the VALUE_PAIR structure
Now that we're not writing strings to integer attributes,
we can dynamically change the size of the VALUE_PAIR.
It should be large enough to contain it's necessary fields,
and *only* enough of the VALUE_PAIR_DATA structure to contain
the type-specific data. This means we save 250 bytes
of memory for every integer / date / ipaddr VALUE_PAIR.
Alan T. DeKok [Tue, 22 Nov 2011 13:44:55 +0000 (14:44 +0100)]
Removed "addport" functionality.
It was always a terrible hack. There should be better ways
to do it, like actually tracking IP addresses.
Alan T. DeKok [Tue, 22 Nov 2011 13:39:38 +0000 (14:39 +0100)]
No need to sprintf "%s"
Use strlcpy instead
Alan T. DeKok [Tue, 22 Nov 2011 13:33:29 +0000 (14:33 +0100)]
No need to cast to IPv6
because we can reference the struct element directly.
Alan T. DeKok [Tue, 22 Nov 2011 09:46:16 +0000 (10:46 +0100)]
Manually pull rlm_securid from the v2.1.x branch
With minor changes for the 3.0 API
Alan T. DeKok [Mon, 21 Nov 2011 16:47:27 +0000 (17:47 +0100)]
Correct typo in error message
ascend secret is "encrypt=3", not "encrypt=2"
Alan T. DeKok [Sun, 20 Nov 2011 16:44:55 +0000 (17:44 +0100)]
Update for 3.0 API
We do lookups on attr+vendor, not just attr
Alan T. DeKok [Sun, 20 Nov 2011 16:37:19 +0000 (17:37 +0100)]
Correct references
../foo instead of foo
Luke Howard [Sat, 19 Nov 2011 03:32:07 +0000 (14:32 +1100)]
surface RFC822 subject alt name
Alan T. DeKok [Fri, 18 Nov 2011 14:24:02 +0000 (15:24 +0100)]
Document net admin capabilities
So that the server can set arp table entries as non-root
Arran Cudbard-Bell [Fri, 18 Nov 2011 23:06:12 +0000 (00:06 +0100)]
Fix typo in listen.c
Renaud Métrich [Fri, 18 Nov 2011 08:37:37 +0000 (09:37 +0100)]
Fixed compilation break + use of uninitialized value
Alan T. DeKok [Thu, 17 Nov 2011 16:26:40 +0000 (17:26 +0100)]
Build without UDPFROMTO
If it's defined, we do more sanity checks. If it's not
defined, we might behave weirdly if DHCP servers on the network
are broken
Alan T. DeKok [Thu, 17 Nov 2011 14:04:25 +0000 (15:04 +0100)]
Added DHCP relay functions
For processing client request > server and server reply -> client
The code is unused for now, but will be used shortly
Alan T. DeKok [Thu, 17 Nov 2011 14:03:01 +0000 (15:03 +0100)]
Added sample virtual server for DHCP relaying
Alan T. DeKok [Thu, 17 Nov 2011 13:36:46 +0000 (14:36 +0100)]
Added fr_dhcp_add_arp_entry
This will later be used for the updated DHCP code
Alan T. DeKok [Thu, 17 Nov 2011 16:06:04 +0000 (17:06 +0100)]
Ensure struct is initialized
Alan T. DeKok [Thu, 17 Nov 2011 11:06:12 +0000 (12:06 +0100)]
Added copyright to dictionaries
For ones which are only in v3.0
Alan T. DeKok [Thu, 17 Nov 2011 11:00:42 +0000 (12:00 +0100)]
Include copyright lines
This is for people who can't be bothered to give attribution
where it's due. The dictionary files we have here give authors,
origins, web pages, etc. where possible. It's only reasonable
for others to do the same.
Sadly, that's asking too much of some people. So we've added
explicit copyright statements so that people have no excuse.
Alan T. DeKok [Fri, 11 Nov 2011 08:26:15 +0000 (09:26 +0100)]
Added minor debug message
Alan T. DeKok [Sun, 13 Nov 2011 12:02:21 +0000 (13:02 +0100)]
Clean up for 3.0
Use new connection pool API. Document it.
Use a more consistent module configuration
Less code, and it does more
Alan T. DeKok [Fri, 11 Nov 2011 13:01:14 +0000 (14:01 +0100)]
Set fr_log_fp when using '-l'
So that we can get debugging from libfreeradius-radius
Alan T. DeKok [Fri, 11 Nov 2011 12:58:50 +0000 (13:58 +0100)]
DEBUG -> RDEBUG
Arran Cudbard-Bell [Sun, 13 Nov 2011 00:10:28 +0000 (01:10 +0100)]
Enable generation of interactive SVG diagrams
Update Doxyfile to latest version
Arran Cudbard-Bell [Sat, 12 Nov 2011 23:19:59 +0000 (00:19 +0100)]
Turn on DOT rendering of Class diagrams
Arran Cudbard-Bell [Sat, 12 Nov 2011 23:13:37 +0000 (00:13 +0100)]
Add certificate files to .gitignore
Arran Cudbard-Bell [Sat, 12 Nov 2011 23:09:38 +0000 (00:09 +0100)]
Add .gitignore to ignore generated doxygen files
Arran Cudbard-Bell [Sat, 12 Nov 2011 19:16:15 +0000 (11:16 -0800)]
Merge pull request #34 from arr2036/valuepair_lists
Valuepair lists
Arran Cudbard-Bell [Fri, 11 Nov 2011 12:50:40 +0000 (13:50 +0100)]
Prevent radius_list_name matching on tags, assume string without preceeding colon and that starts with a lowercase letter is a list
Arran Cudbard-Bell [Thu, 10 Nov 2011 19:19:21 +0000 (20:19 +0100)]
Fixup doxygen comments
Arran Cudbard-Bell [Thu, 10 Nov 2011 19:08:48 +0000 (20:08 +0100)]
Deduplicate attribute name resolution code between valuepair.c and evaluate.c
Alan T. DeKok [Wed, 9 Nov 2011 20:56:48 +0000 (21:56 +0100)]
More reformatting
Alan T. DeKok [Wed, 9 Nov 2011 20:56:48 +0000 (21:56 +0100)]
More minor reformatting
Arran Cudbard-Bell [Wed, 9 Nov 2011 13:01:14 +0000 (14:01 +0100)]
Fixup doxygen comments in exec.c
Arran Cudbard-Bell [Tue, 8 Nov 2011 14:52:56 +0000 (15:52 +0100)]
Mark section_type_value as external (holds string names of the various sections)
Arran Cudbard-Bell [Tue, 8 Nov 2011 14:40:24 +0000 (15:40 +0100)]
Convert bare enums into types, in C they don't do anything, but it does help make the code self documenting
Alan T. DeKok [Mon, 7 Nov 2011 15:19:29 +0000 (16:19 +0100)]
Updated the NAI document
Alan T. DeKok [Sun, 6 Nov 2011 15:48:01 +0000 (16:48 +0100)]
Added new APIs to add / del a connection
So that servers which accept client connections can add
connections to the pool. And clients can delete connections
from the pool if there is an error with the connection.
Also made it a bit more forgiving. If there is not any
"pool" config, use defaults.
Alan T. DeKok [Sun, 6 Nov 2011 14:53:35 +0000 (15:53 +0100)]
Quiet compile warnings
Arran Cudbard-Bell [Mon, 7 Nov 2011 13:57:12 +0000 (14:57 +0100)]
Make fr_tokens available from token.h or libradius.h
Alan T. DeKok [Sun, 6 Nov 2011 10:17:41 +0000 (11:17 +0100)]
Added support for triggers
start/stop connection pool
open/close individual connection
Alan T. DeKok [Sun, 6 Nov 2011 10:02:44 +0000 (11:02 +0100)]
Print WARNING if we fall below "min" connections
We want to close idle sessions, sessions with max lifetime
or max uses. BUT we want to enforce "min". The code will
currently close a connection, notice "num < min", and spawn
a new one. We warn the user that this is happening, so that
they can fix their configuration.
Alan T. DeKok [Sun, 6 Nov 2011 09:55:54 +0000 (10:55 +0100)]
Removed unused variable
Alan T. DeKok [Sun, 6 Nov 2011 09:53:11 +0000 (10:53 +0100)]
We're freeing the connection, so don't use this->next
use this = next instead
Alan T. DeKok [Sun, 6 Nov 2011 09:52:51 +0000 (10:52 +0100)]
Don't unlock the mutex. We didn't lock it
Alan T. DeKok [Sun, 6 Nov 2011 09:21:52 +0000 (10:21 +0100)]
Initialize "last_used" when spawning a new connection
Arran Cudbard-Bell [Sun, 6 Nov 2011 01:17:29 +0000 (02:17 +0100)]
Add cleanup_delay configuration item with a default of five seconds
without this we always end up cleaning up start-spare connections
on the first few requests.
Arran Cudbard-Bell [Fri, 4 Nov 2011 16:12:13 +0000 (17:12 +0100)]
my_request should initially be set to request
Arran Cudbard-Bell [Fri, 4 Nov 2011 13:50:30 +0000 (06:50 -0700)]
Merge pull request #32 from arr2036/valuepair_lists
Add radius_get_vps function to find attribute list based on [outer.][<list>:]<attribute>
Arran Cudbard-Bell [Thu, 3 Nov 2011 16:19:51 +0000 (17:19 +0100)]
Add radius_get_vps function to find attribute list based on <list>:<attribute> attribute identifier format
Alan T. DeKok [Fri, 4 Nov 2011 11:54:52 +0000 (12:54 +0100)]
Turn assert into run-time check
Alan T. DeKok [Thu, 3 Nov 2011 11:26:06 +0000 (12:26 +0100)]
Fix typo
Arran Cudbard-Bell [Thu, 3 Nov 2011 13:08:45 +0000 (06:08 -0700)]
Merge pull request #31 from duchscherd/tamu
Add additional attributes and values for Netbotz Rack Access PX - HID.