diff --git a/android/project/jni/fwknop/fko.h b/android/project/jni/fwknop/fko.h index d59dbaa5..79be54c8 100644 --- a/android/project/jni/fwknop/fko.h +++ b/android/project/jni/fwknop/fko.h @@ -32,8 +32,6 @@ #define FKO_H 1 #include -#include "fko_limits.h" -#include "fko_message.h" #ifdef __cplusplus extern "C" { diff --git a/android/project/jni/fwknop/fko_limits.h b/android/project/jni/fwknop/fko_limits.h index 7efba4b3..01b85fd4 100644 --- a/android/project/jni/fwknop/fko_limits.h +++ b/android/project/jni/fwknop/fko_limits.h @@ -54,6 +54,9 @@ #define MAX_IPV4_STR_LEN 16 #define MIN_IPV4_STR_LEN 7 +#define MAX_PROTO_STR_LEN 4 /* tcp, udp, icmp for now */ +#define MAX_PORT_STR_LEN 5 + /* Misc. */ #define FKO_ENCODE_TMP_BUF_SIZE 1024 diff --git a/android/project/jni/fwknop/fko_message.h b/android/project/jni/fwknop/fko_message.h index 8c57252d..d36d58e7 100644 --- a/android/project/jni/fwknop/fko_message.h +++ b/android/project/jni/fwknop/fko_message.h @@ -32,19 +32,6 @@ #ifndef FKO_MESSAGE_H #define FKO_MESSAGE_H 1 -#if PLATFORM_OPENBSD - #include - #include -#else - #if HAVE_SYS_SOCKET_H - #include - #endif -#endif -#include - -#define MAX_PROTO_STR_LEN 4 /* tcp, udp, icmp for now */ -#define MAX_PORT_STR_LEN 5 - /* SPA message format validation functions. */ int validate_cmd_msg(const char *msg); diff --git a/common/common.h b/common/common.h index daddec7c..96ad4c41 100644 --- a/common/common.h +++ b/common/common.h @@ -99,6 +99,7 @@ #endif #include "fko.h" +#include "fko_limits.h" /* Get our program version from VERSION (defined in config.h). */ diff --git a/fwknop.spec b/fwknop.spec index 88b2c8d7..02a72b72 100644 --- a/fwknop.spec +++ b/fwknop.spec @@ -130,8 +130,6 @@ fi %files -n libfko-devel %defattr(-,root,root,-) %attr(0644,root,root) %{_includedir}/fko.h -%attr(0644,root,root) %{_includedir}/fko_limits.h -%attr(0644,root,root) %{_includedir}/fko_message.h %attr(0644,root,root) %{_infodir}/libfko.info* %files server @@ -143,6 +141,10 @@ fi %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/fwknop/access.conf %changelog +* Sat Dec 1 2012 - 2.0.4-1 +- Removed uneeded include files (which had been added to address an issue that + has since been fixed). + * Thu Nov 15 2012 - fwknop-2.0.4 release. diff --git a/lib/Makefile.am b/lib/Makefile.am index 03a43c18..85c0bd3f 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -16,4 +16,4 @@ libfko_la_LDFLAGS = -version-info 0:4:0 $(GPGME_LIBS) AM_CPPFLAGS = $(GPGME_CFLAGS) -I $(top_srcdir)/common -include_HEADERS = fko.h fko_limits.h fko_message.h +include_HEADERS = fko.h diff --git a/lib/fko.h b/lib/fko.h index d59dbaa5..79be54c8 100644 --- a/lib/fko.h +++ b/lib/fko.h @@ -32,8 +32,6 @@ #define FKO_H 1 #include -#include "fko_limits.h" -#include "fko_message.h" #ifdef __cplusplus extern "C" { diff --git a/lib/fko_limits.h b/lib/fko_limits.h index 7efba4b3..01b85fd4 100644 --- a/lib/fko_limits.h +++ b/lib/fko_limits.h @@ -54,6 +54,9 @@ #define MAX_IPV4_STR_LEN 16 #define MIN_IPV4_STR_LEN 7 +#define MAX_PROTO_STR_LEN 4 /* tcp, udp, icmp for now */ +#define MAX_PORT_STR_LEN 5 + /* Misc. */ #define FKO_ENCODE_TMP_BUF_SIZE 1024 diff --git a/lib/fko_message.c b/lib/fko_message.c index 98587c03..b057e36d 100644 --- a/lib/fko_message.c +++ b/lib/fko_message.c @@ -232,7 +232,7 @@ validate_cmd_msg(const char *msg) /* Should always have a valid allow IP regardless of message type */ if((res = have_allow_ip(msg)) != FKO_SUCCESS) - return(res); + return(FKO_ERROR_INVALID_SPA_COMMAND_MSG); /* Commands are fairly free-form so all we can really verify is * there is something at all. Get past the IP and comma, and make @@ -292,7 +292,7 @@ validate_nat_access_msg(const char *msg) /* Should always have a valid allow IP regardless of message type */ if((res = have_allow_ip(msg)) != FKO_SUCCESS) - return(res); + return(FKO_ERROR_INVALID_SPA_NAT_ACCESS_MSG); /* Position ourselves beyond the allow IP and make sure we have * a single port value @@ -304,7 +304,7 @@ validate_nat_access_msg(const char *msg) ndx++; if((res = have_port(ndx)) != FKO_SUCCESS) - return(res); + return(FKO_ERROR_INVALID_SPA_NAT_ACCESS_MSG); if(msg[startlen-1] == ',') return(FKO_ERROR_INVALID_SPA_NAT_ACCESS_MSG); diff --git a/lib/fko_message.h b/lib/fko_message.h index 9c192e13..d36d58e7 100644 --- a/lib/fko_message.h +++ b/lib/fko_message.h @@ -32,9 +32,6 @@ #ifndef FKO_MESSAGE_H #define FKO_MESSAGE_H 1 -#define MAX_PROTO_STR_LEN 4 /* tcp, udp, icmp for now */ -#define MAX_PORT_STR_LEN 5 - /* SPA message format validation functions. */ int validate_cmd_msg(const char *msg); diff --git a/lib/fko_user.h b/lib/fko_user.h index b521dca0..fa756139 100644 --- a/lib/fko_user.h +++ b/lib/fko_user.h @@ -1,7 +1,7 @@ /* ***************************************************************************** * - * File: fko_message.h + * File: fko_user.h * * Author: Michael Rash * diff --git a/perl/FKO/t/02_functions.t b/perl/FKO/t/02_functions.t index 4e57586c..fa63502f 100644 --- a/perl/FKO/t/02_functions.t +++ b/perl/FKO/t/02_functions.t @@ -179,8 +179,8 @@ is($f1->spa_message(), '1.1.1.1,udp/111', 'verify spa message'); # 91-92 - Nat Access # -ok($f1->spa_nat_access('1.2.1.1,udp/211') == 0, 'set nat_access message'); -is($f1->spa_nat_access(), '1.2.1.1,udp/211', 'verify nat_access message'); +ok($f1->spa_nat_access('1.2.1.1,211') == 0, 'set nat_access message'); +is($f1->spa_nat_access(), '1.2.1.1,211', 'verify nat_access message'); # 93-94 - Server Auth #