Commit Graph

130 Commits

Author SHA1 Message Date
Tobias Brunner 28649f6d91 libhydra: Remove empty unused library 2016-03-03 17:36:11 +01:00
Thom Troy ac36ede93c eap-radius: Add ability to configure RADIUS retransmission behavior
Closes strongswan/strongswan#19.
2015-11-17 14:25:08 +01:00
Tobias Brunner fdfbd401c3 eap-radius: Compare address family when handing out virtual IPs
This also ensures that the actually released virtual IP is removed from
the list of claimed IPs.

Fixes #1199.
2015-11-12 14:32:11 +01:00
Tobias Brunner 00c2c87b06 eap-radius: Fix creation of host_t objects based on Framed-IPv6-Address attributes
Fixes ec490e68ae ("eap-radius: Add support for some basic IPv6-specific RADIUS attributes").
References #1001.
2015-08-28 16:52:57 +02:00
Tobias Brunner 39afe6e9d0 eap-radius: Use Framed-IPv6-Address attributes to send IPv6 VIPs in accounting messages
This attribute is more appropriate for single IPv6 virtual IPs than the
Framed-IPv6-Prefix attribute.

Fixes #1001.
2015-08-17 11:23:41 +02:00
Tobias Brunner ec490e68ae eap-radius: Add support for some basic IPv6-specific RADIUS attributes
These are defined in RFC 6911.

Fixes #1001.
2015-08-17 11:23:33 +02:00
Tobias Brunner d04b093374 eap-radius: Don't send RADIUS Accounting Start messages twice
If a client does Mode Config during reauthentication the assign_vips()
event might be triggered twice, we should not send another Start message
in that case.

Fixes #937.
2015-08-06 14:57:47 +02:00
Tobias Brunner 186d25cbe6 eap-radius: Change trigger for Accounting Start messages for IKEv1
Some clients won't do Mode Config or XAuth during reauthentication.
Because Start messages previously were triggered by TRANSACTION exchanges
none were sent for new SAs of such clients, while Stop messages were still
sent for the old SAs when they were destroyed.  This resulted in an
incorrect state on the RADIUS server.

Since 31be582399 the assign_vips() event is also triggered during
reauthentication if the client does not do a Mode Config exchange.
So instead of waiting for a TRANSACTION exchange we trigger the Start
message when a virtual IP is assigned to a client.

With this the charon.plugins.eap-radius.accounting_requires_vip option
would not have any effect for IKEv1 anymore.  However, it previously also
only worked if the client did an XAuth exchange, which is probably
rarely used without virtual IPs, so this might not be much of a
regression.

Fixes #937.
2015-08-06 14:57:26 +02:00
Tobias Brunner 2b51124026 eap-radius: Keep track of stats for SAs migrated during IKEv1 reauthentication 2015-05-21 15:38:31 +02:00
Tobias Brunner 8dbef6dac8 eap-radius: Remove cache entries for expired SAs during ike/child_rekey 2015-05-21 15:38:31 +02:00
Tobias Brunner 7fbe79bce7 eap-radius: Add cache for usage stats of expired/rekeyed SAs
There are several situations that the previous code didn't handle that
well, for example, interim updates during rekeying (until the rekeyed SA
was deleted the numbers were too high, then suddenly dropped afterwards),
or rekeying for IKEv1 in general because rekeyed IPsec SAs stay installed
until they expire (so if they were still around when the IKE_SA was
terminated, the reported numbers in the Stop message were too high).

If intermediate updates are not used the cache entries for rekeyed
CHILD_SA will accumulate, we can't clean them up as we don't get
child_updown() events for them.
2015-05-21 15:38:25 +02:00
Martin Willi c4b6332211 eap-radius: Increase Acct-Session-ID string buffer
As the startup timestamp needs 10 characters, we only have left 4 characters
for the IKE_SA unique identifier. This is insufficient when having 10000 IKE_SAs
or more established, resulting in non-unique session identifiers.

Fixes #889.
2015-03-13 09:42:03 +01:00
Martin Willi bc9ded9dbf attribute-provider: Pass full IKE_SA to provider backends 2015-02-20 13:34:56 +01:00
Martin Willi 751363275f attributes: Move the configuration attributes framework to libcharon 2015-02-20 13:34:55 +01:00
Martin Willi 971ef077ce eap-radius: Use the single-server legacy server options as fallback 2014-12-12 10:23:59 +01:00
Tobias Brunner 3633b80147 eap-radius: Add option to set interval for interim accounting updates
Any interval returned by the RADIUS server in the Access-Accept message
overrides the configured interval.  But it might be useful if RADIUS is
only used for accounting.
2014-10-10 09:51:13 +02:00
Tobias Brunner de622eb1f9 eap-radius: Forward Cisco and Microsoft specific DNS/NBNS attributes
Fixes #677.
2014-09-09 10:56:16 +02:00
Martin Willi fc8ca5f2f2 eap-radius: Increase buffer for accounting attributes to maximum attribute size
Fixes #624.
2014-06-25 13:11:34 +02:00
Martin Willi 3ecfc83c6b payload: Use common prefixes for all payload type identifiers
The old identifiers did not use a proper namespace and often clashed with
other defines.
2014-06-04 15:53:03 +02:00
Martin Willi 4163421f91 plugins: Don't link with -rdynamic on Windows 2014-06-04 15:53:02 +02:00
Martin Willi 064fe9c963 enum: Return boolean result for enum_from_name() lookup
Handling the result for enum_from_name() is difficult, as checking for
negative return values requires a cast if the enum type is unsigned. The new
signature clearly differentiates lookup result from lookup value.

Further, this actually allows to convert real -1 enum values, which could not
be distinguished from "not-found" and the -1 return value.

This also fixes several clang warnings where enums are unsigned.
2014-05-16 15:42:07 +02:00
Tobias Brunner 3b09c02ec0 Properly hash pointers for hash tables where appropriate
Simply using the pointer is not optimal for our hash table
implementation, which simply masks the key to determine the bucket.
2014-03-31 14:32:44 +02:00
Tobias Brunner 00b91c4325 eap-radius: Add option to not close IKE_SAs on timeouts during interim accouting updates
Fixes #528.
2014-03-31 14:32:44 +02:00
Tobias Brunner d223fe807a libcharon: Use lib->ns instead of charon->name 2014-02-12 14:34:32 +01:00
Tobias Brunner feb3c4ff22 eap-radius: Forward RAT_FRAMED_IP_NETMASK as INTERNAL_IP4_NETMASK 2013-10-11 15:52:22 +02:00
Tobias Brunner 1a809e46f8 eap-radius: Forward UNITY_SPLIT_INCLUDE or UNITY_LOCAL_LAN attributes
Depending on the value of the CVPN3000-IPSec-Split-Tunneling-Policy(55)
radius attribute, the subnets in the CVPN3000-IPSec-Split-Tunnel-List(27)
attribute are sent in either a UNITY_SPLIT_INCLUDE (if the value is 1)
or a UNITY_LOCAL_LAN (if the value is 2).

So if the following attributes would be configured for a RADIUS user

  CVPN3000-IPSec-Split-Tunnel-List := "10.0.1.0/255.255.255.0,10.0.2.0/255.255.255.0"
  CVPN3000-IPSec-Split-Tunneling-Policy := 1

A UNITY_SPLIT_INCLUDE configuration payload containing these two subnets
would be sent to the client during the ModeCfg exchange.
2013-10-11 15:52:22 +02:00
Tobias Brunner 66229619cf eap-radius: Forward UNITY_DEF_DOMAIN and UNITY_SPLITDNS_NAME attributes
The contents of the CVPN3000-IPSec-Default-Domain(28) and
CVPN3000-IPSec-Split-DNS-Names(29) radius attributes are forwarded in
the corresponding Unity configuration attributes.
2013-10-11 15:52:22 +02:00
Tobias Brunner e4b7b48c1e eap-radius: Increase buffer for attributes sent in RADIUS accounting messages
64 bytes might be too short for user names/identities.
2013-09-27 13:37:12 +02:00
Martin Willi d787ada894 eap-radius: support XAuth configuration profiles, defining multiple XAuth rounds 2013-09-03 16:26:19 +02:00
Martin Willi 510ecf612a xauth: add a configuration string option to be passed to XAuth instances
The configuration string is appended to the XAuth backend name, separated by
a colon. The configuration string is passed untouched to the backend, where
it can change the behavior of the XAuth module.
2013-09-03 16:26:19 +02:00
Martin Willi 3a399574c2 eap-radius: do RADIUS/IKE attribute forwarding in XAuth backend 2013-07-29 09:00:49 +02:00
Martin Willi c434b2a4a9 eap-radius: support plain XAuth RADIUS authentication using User-Password 2013-07-29 09:00:49 +02:00
Martin Willi 9aeb6cea4c eap-radius: export function to build common attributes of Access-Request 2013-07-29 09:00:48 +02:00
Martin Willi 94ec80e74c eap-radius: export function to process common attributes of Access-Accept 2013-07-29 09:00:48 +02:00
Martin Willi 5f755cef46 eap-radius: use watcher instead of receiver thread on DAE socket 2013-07-18 16:00:30 +02:00
Martin Willi 19cb07b890 automake: replace INCLUDES by AM_CPPFLAGS
INCLUDES are now deprecated and throw warnings when using automake 1.13.
We now also differentiate AM_CPPFLAGS and AM_CFLAGS, where includes and
defines are passed to AM_CPPFLAGS only.
2013-07-18 14:59:19 +02:00
Martin Willi 282e4d2c7c eap-radius: fix add_attribute/framed_ip method signatures 2013-07-01 11:53:52 +02:00
Tobias Brunner 460488b180 eap-radius: Do initialization in a plugin feature callback 2013-06-11 11:18:19 +02:00
Martin Willi aea7ce3c64 eap-radius: add an option to disable accounting for tunnels without virtual IP 2013-05-06 14:56:01 +02:00
Martin Willi 69620a48e8 eap-radius: use IKE_SA unique id instead of peer identity to manage virtual IPs
Fixes some corner cases if multiple tunnels use the same peer identity.
2013-05-06 14:56:01 +02:00
Andreas Steffen 2d902d7e7c fixed typo 2013-04-19 18:33:41 +02:00
Martin Willi b2b99e61c8 eap-radius: Add an option to exclude ports from Called/Calling-Station-Id 2013-04-10 13:48:03 +02:00
Tobias Brunner 54781f5f34 Fixed Doxygen comment in eap_radius plugin 2013-03-27 11:08:55 +01:00
Tobias Brunner cf95d2926c Fixed some typos, courtesy of codespell 2013-03-25 10:59:37 +01:00
Tobias Brunner e8526ae991 Removed unused variable 'id' 2013-03-19 16:37:40 +01:00
Martin Willi e813d218f1 Don't create interim update entries if RADIUS accounting is disabled 2013-03-14 16:44:09 +01:00
Martin Willi d019764ab6 Add support for RADIUS Interim accounting updates 2013-03-14 16:35:11 +01:00
Martin Willi 1ba1cd0c9b Add an option to delete any established IKE_SA if RADIUS server is not responding 2013-03-14 15:42:30 +01:00
Martin Willi 552b8ad5f5 Send Acct-Terminate-Cause based on some alerts catched on the bus
Currently supported are user disconnects, session timeouts and if the peer does
not respond on IKE packets or DPDs.
2013-03-14 14:20:55 +01:00
Martin Willi 68c12fd9f9 Send NAS-Port, NAS-IP and Calling/Called-Station-ID in Accounting-Requests 2013-03-14 14:20:54 +01:00