Martin Willi
a30727fe2b
socket-default: refactor socket pair opening to a function
2013-05-06 16:10:11 +02:00
Martin Willi
6948df3220
socket-default: Don't try to send packet if we haven't a socket for given family
2013-05-06 16:10:10 +02:00
Martin Willi
e9326eba13
socket-default: Use -1 if socket is not available, as 0 is actually a valid fd
2013-05-06 16:10:10 +02:00
Martin Willi
ea5917afd8
Set DSCP values when sending IP packets in socket-default
2013-02-06 15:20:32 +01:00
Martin Willi
6e82269ee6
Don't send a packet in default socket if family is not IPv4 nor IPv6
2013-02-06 15:20:32 +01:00
Martin Willi
6c37daaa3b
Avoid extensive casting of sockaddr types in socket-default by using a union
...
Additionally fixes a strict-aliasing rule compiler warning with older gcc.
2013-02-06 15:20:32 +01:00
Tobias Brunner
45178362c8
Clarified error message if enabling UDP decapsulation fails
2012-09-27 10:49:17 +02:00
Tobias Brunner
aaefeafb49
Enable UDP decapsulation for both address families
...
Since the 3.5 Linux kernel both UDP implementations have a separate static
flag to indicate whether ANY sockets enabled UDP decapsulation.
As we only ever enabled it for one address family (in earlier versions IPv4
only, now for IPv6, if supported, and for IPv4 otherwise) UDP decapsulation
wouldn't work anymore (at least for one address family).
2012-08-16 15:26:37 +02:00
Tobias Brunner
6fbf4472ea
Added option to prevent socket-default from setting the source address on outbound packets
2012-08-08 15:39:07 +02:00
Tobias Brunner
224ab4c59b
socket-default plugin allocates random ports if configured to 0.
...
Also added strongswan.conf options to change the ports.
2012-08-08 15:30:27 +02:00
Tobias Brunner
a7babe25ee
Added get_port() method to socket_t to learn the listening port.
2012-08-08 15:12:25 +02:00
Tobias Brunner
896941d365
Improved how NAT-T keepalives are handled in sockets/receiver.
2012-08-08 15:12:24 +02:00
Tobias Brunner
e49abcede0
Let kernel interfaces decide how to enable UDP decapsulation of ESP packets.
2012-08-08 15:12:24 +02:00
Tobias Brunner
064da8b96b
Add Non-ESP marker in sender and not individual socket plugins.
2012-08-08 15:12:24 +02:00
Tobias Brunner
65da43e2fc
Handle Non-ESP marker in receiver and not individual socket plugins.
2012-08-08 15:12:24 +02:00
Tobias Brunner
e7ea057fd2
Make the UDP ports charon listens for packets on (and uses as source ports) configurable.
2012-08-08 15:07:43 +02:00
Tobias Brunner
f7cbc0fafe
Use proper defines for IPV6_PKTINFO on Mac OS X Lion and newer.
2012-06-13 15:02:10 +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
ff6aab9e85
Fix alignement compiler warning
2011-06-03 10:49:54 +02:00
Tobias Brunner
fa20849431
Deferred instantiation of socket implmentations until registration.
...
Instantiating the implementations on plugin load was problematic
in case multiple socket plugins were loaded. Now, the first one
registered is instantiated.
2010-10-15 17:30:21 +02:00
Tobias Brunner
f6659688ab
Refer to kernel interface via hydra and not charon.
2010-09-02 19:01:25 +02:00
Andreas Steffen
897c7a72cf
Win7 might send up to 7k of certificate requests
2010-08-27 16:30:05 +02:00
Martin Willi
aea735ef63
Discard a packet that exceeds the receive buffer
2010-08-11 10:52:59 +02:00
Martin Willi
10a2e09b55
Added a strongswan.conf option to change socket receive buffer size
2010-08-11 10:48:17 +02:00
Tobias Brunner
08c5572602
Moving charon to libcharon.
2010-03-19 13:34:52 +01:00