diff --git a/HACKING b/HACKING index 3303790f7..17925545d 100644 --- a/HACKING +++ b/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. diff --git a/configure.in b/configure.in index 174d40100..8cc897944 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/charon/network/socket.c b/src/charon/network/socket.c index e74af770e..c69f3714d 100644 --- a/src/charon/network/socket.c +++ b/src/charon/network/socket.c @@ -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) {