Commit Graph

50 Commits

Author SHA1 Message Date
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 4163421f91 plugins: Don't link with -rdynamic on Windows 2014-06-04 15:53:02 +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 d223fe807a libcharon: Use lib->ns instead of charon->name 2014-02-12 14:34:32 +01:00
Thomas Egerer 3711f66e54 dhcp: Allow binding of socket to particular interface
In certain situations it is desirable to bind the send/receive sockets
for the DHCP address allocation to a particular interface. With this
patch the strongswan.conf option charon.plugins.dhcp.interface can be
used to restrict the DHCP communication to a configurable interface.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2014-01-20 16:40:34 +01:00
Martin Willi c0db5d3845 dhcp: use watcher instead of dedicated receiver thread 2013-07-18 16:00:30 +02:00
Tobias Brunner dfc9902013 capabilities: Some plugins don't actually require capabilities at runtime 2013-07-18 15:25:35 +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
Tobias Brunner 50daffb784 dhcp: Use chunk_hash_static() to calculate ID-based MAC addresses 2013-06-28 17:00:29 +02:00
Tobias Brunner 6f15f5e632 dhcp: Require CAP_NET_BIND_SERVICE and CAP_NET_RAW to open/bind sockets 2013-06-25 17:16:32 +02:00
Martin Willi 24303f99f7 dhcp: search for transactions only for connections having a poolname "dhcp"
When a connection has a single pool that queries recursively the DHCP backend,
we shouldn't return any attributes directly from DHCP when queried for that
pool.
2013-06-18 09:50:29 +02:00
Tobias Brunner 12459a4dc8 dhcp: Use plugin features with dependency to RNG implementation 2013-06-11 11:18:17 +02:00
Tobias Brunner 12642a6831 Moved data structures to new collections subfolder 2012-10-24 16:00:49 +02:00
Tobias Brunner 2e7cc07ecd Moved host_t and host_resolver_t to a new networking subfolder 2012-10-24 15:06:18 +02:00
Tobias Brunner 9d5b688a11 Properly initialize sockaddr_in struct in fast and dhcp plugins 2012-09-28 16:28:46 +02:00
Tobias Brunner bc6ec4de73 Option added to enforce a configured destination address for DHCP packets 2012-09-13 10:59:24 +02:00
Martin Willi 28a3d5bfbd Pass full pool list to release_address 2012-09-11 16:18:28 +02:00
Martin Willi 594c58e111 Pass the full list of pools to acquire_address, enumerate in providers
If the provider has access to the full pool list, it can enumerate
them twice, for example to search for existing leases first, and
only search for new leases in a second step.

Fixes lease enumeration in attr-sql using multiple pools.
2012-09-11 16:18:28 +02:00
Martin Willi 980c468cdc DHCP plugin returns virtual IPs for IPv4 requests only 2012-08-30 16:43:44 +02:00
Martin Willi d55fe264d1 Pass all configured pool names to attribute provider enumerator 2012-08-30 16:43:43 +02:00
Martin Willi feb8550401 Pass a list instead of a single virtual IP to attribute enumerators 2012-08-30 16:43:42 +02:00
Tobias Brunner 7ae2671036 Check rng return value when generating Transaction IDs in DHCP plugin 2012-07-16 14:53:36 +02:00
Tobias Brunner 26d77eb3e6 Centralized thread cancellation in processor_t
This ensures that no threads are active when plugins and the rest of the
daemon are unloaded.

callback_job_t was simplified a lot in the process as its main
functionality is now contained in processor_t.  The parent-child
relationships were abandoned as these were only needed to simplify job
cancellation.
2012-06-25 17:38:59 +02:00
Tobias Brunner 42500c274a Use name from initialization to access settings in libcharon.
Also fixes several whitespace errors.
2012-05-03 13:57:04 +02:00
Martin Willi 14bf2f689d Use CRITICAL job priority class for long running dispatcher jobs 2011-05-16 15:24:15 +02:00
Martin Willi 2b3c87b49a Set broadcast flag in DHCP requests when sending broadcasts 2011-04-15 13:00:23 +02:00
Martin Willi c55818ebb0 Added a (not yet implemented) plugin_t method to reload plugin configuration 2011-04-15 10:07:13 +02:00
Martin Willi 787b5884aa Added a get_name() function to plugin_t, create_plugin_enumerator enumerates over plugin_t 2011-04-15 10:07:12 +02:00
Martin Willi 9bac426bf3 Fixed memory cleanup if no DHCP transaction found for an OFFER 2011-01-13 10:36:16 +01:00
Martin Willi e3bde0ef82 Prefer the 'server identifier' attribute address to send DHCP requests to 2010-10-18 12:32:16 +02:00
Tobias Brunner bb381e26c6 Refer to scheduler and processor via lib and not hydra. 2010-09-02 19:04:18 +02:00
Tobias Brunner f6659688ab Refer to kernel interface via hydra and not charon. 2010-09-02 19:01:25 +02:00
Tobias Brunner c5f7146b17 Refer to processor via hydra and not charon. 2010-09-02 19:01:22 +02:00
Martin Willi ba31fe1fd6 Use a seperate section for each nested struct member in INIT macro 2010-08-18 12:15:03 +02:00
Tobias Brunner af7b34b13b Added missing pool parameter in DHCP attribute provider. 2010-07-12 12:27:49 +02:00
Andreas Steffen 12821bd674 include dhcp-client-identifier in the DHCP request 2010-04-23 12:57:43 +02:00
Andreas Steffen 19d49af539 make DHCP debug messages consistent 2010-04-23 07:37:16 +02:00
Andreas Steffen 500a6d38ee fixed typo 2010-04-23 00:02:13 +02:00
Martin Willi f0212e8837 Accept DHCP replies on bootps port, as we act as a relay agent if server address configured 2010-04-19 11:18:58 +02:00
Tobias Brunner 18c68f22c7 Revert "Use the same formatting as in the Makefiles of the other plugins. Makes refactorings easier."
This reverts commit e91b116a62. Missed to
notice commit 89bf11d204.
2010-03-26 10:47:09 +01:00
Tobias Brunner e91b116a62 Use the same formatting as in the Makefiles of the other plugins. Makes refactorings easier. 2010-03-26 10:40:14 +01:00
Martin Willi 0e1689e98f Migrated dhcp plugin to moved attribute manager 2010-03-25 14:33:22 +01:00
Martin Willi b262429e0b Include configuration payloads for DNS/WINS server received via DHCP 2010-03-25 14:29:10 +01:00
Martin Willi 913eb69692 Send DHCP RELEASE on virtual IP release 2010-03-25 14:29:10 +01:00
Martin Willi e06a6154e2 Added identity_lease option to create random or identity based DHCP leases 2010-03-25 14:28:29 +01:00
Martin Willi 4f0932ecfe Added DHCP request construction, ACK processing 2010-03-25 14:28:29 +01:00
Martin Willi 20ee54d06f Added reception of DHCP responses via PACKET socket 2010-03-25 14:28:29 +01:00
Martin Willi ddc93db612 DHCP plugin framework, send DHCP Discover upon IP request 2010-03-25 14:28:28 +01:00
Martin Willi beaa048eed Added DHCP plugin stub. 2010-03-25 14:28:28 +01:00