fixed more uClibc issues
should compile against a uClibc > 0.9.28 (untested)
This commit is contained in:
parent
abff42f8bf
commit
4986554f1a
21
HACKING
21
HACKING
|
@ -2,6 +2,9 @@
|
|||
strongSwan - Development
|
||||
-------------------------
|
||||
|
||||
Subversion repository
|
||||
---------------------
|
||||
|
||||
For interested developers, we have a public repository. To check out and
|
||||
compile the code, you need the following tools:
|
||||
|
||||
|
@ -33,3 +36,21 @@ Then you're in, start the build as usual:
|
|||
./configure [options]
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
uClibc support
|
||||
--------------
|
||||
|
||||
Support for uClibc is still work in progress. To get startet with strongSwan
|
||||
on uClibc, yoou need version which supports getifaddrs ( > 0.9.28).
|
||||
Additionally, you need the at least the following options:
|
||||
|
||||
String and Stdio Support --->
|
||||
[*] Support glibc's register_printf_function()
|
||||
[*] Support the '%m' specifier in printf format strings
|
||||
General Library Settings --->
|
||||
[*] Support global constructors and destructors
|
||||
|
||||
We must reduce the number of printf handlers, as uClibc only supports 10 of
|
||||
them. It is fairly untested yet, so don't except to get it running without
|
||||
further tweaks.
|
||||
|
|
|
@ -88,7 +88,7 @@ AC_PROG_INSTALL
|
|||
AC_PROG_LIBTOOL
|
||||
AC_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
AC_PROG_CC(intel)
|
||||
AC_PROG_CC()
|
||||
AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
|
||||
AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
|
||||
|
||||
|
@ -96,7 +96,7 @@ dnl ==========================
|
|||
dnl check required libraries
|
||||
dnl ==========================
|
||||
|
||||
AC_CHECK_FUNCS(backtrace getifaddrs)
|
||||
AC_CHECK_FUNCS(backtrace)
|
||||
|
||||
AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
|
||||
if test "$ldap" = "true"; then
|
||||
|
|
|
@ -75,6 +75,11 @@
|
|||
#define IPV6_2292PKTINFO 2
|
||||
#endif /*IPV6_2292PKTINFO*/
|
||||
|
||||
/* missing on uclibc */
|
||||
#ifndef IPV6_IPSEC_POLICY
|
||||
#define IPV6_IPSEC_POLICY 34
|
||||
#endif /*IPV6_IPSEC_POLICY*/
|
||||
|
||||
typedef struct private_socket_t private_socket_t;
|
||||
|
||||
/**
|
||||
|
@ -545,13 +550,11 @@ static int open_send_socket(private_socket_t *this, int family, u_int16_t port)
|
|||
}
|
||||
|
||||
/* bypass outgoung IKE traffic on send socket */
|
||||
memset(&policy, 0, sizeof(policy));
|
||||
policy.sadb_x_policy_len = sizeof(policy) / sizeof(u_int64_t);
|
||||
policy.sadb_x_policy_exttype = SADB_X_EXT_POLICY;
|
||||
policy.sadb_x_policy_type = IPSEC_POLICY_BYPASS;
|
||||
policy.sadb_x_policy_dir = IPSEC_DIR_OUTBOUND;
|
||||
policy.sadb_x_policy_reserved = 0;
|
||||
policy.sadb_x_policy_id = 0;
|
||||
policy.sadb_x_policy_priority = 0;
|
||||
|
||||
if (setsockopt(skt, sol, ipsec_policy, &policy, sizeof(policy)) < 0)
|
||||
{
|
||||
|
@ -687,13 +690,11 @@ static int open_recv_socket(private_socket_t *this, int family)
|
|||
}
|
||||
|
||||
/* bypass incomining IKE traffic on this socket */
|
||||
memset(&policy, 0, sizeof(policy));
|
||||
policy.sadb_x_policy_len = sizeof(policy) / sizeof(u_int64_t);
|
||||
policy.sadb_x_policy_exttype = SADB_X_EXT_POLICY;
|
||||
policy.sadb_x_policy_type = IPSEC_POLICY_BYPASS;
|
||||
policy.sadb_x_policy_dir = IPSEC_DIR_INBOUND;
|
||||
policy.sadb_x_policy_reserved = 0;
|
||||
policy.sadb_x_policy_id = 0;
|
||||
policy.sadb_x_policy_priority = 0;
|
||||
|
||||
if (setsockopt(skt, sol, ipsec_policy, &policy, sizeof(policy)) < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue