diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-30 22:51:17 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-30 22:51:17 +0100 |
commit | b3f80c7922908e7d048c4e691ceadf79db62bd75 (patch) | |
tree | 29d9c2dc68e8edaa3384718373f5208ead878c1f /plugin | |
parent | d04d1d78c04b60a406bc5a24c004264f43af520f (diff) | |
download | eurephia-b3f80c7922908e7d048c4e691ceadf79db62bd75.tar.gz eurephia-b3f80c7922908e7d048c4e691ceadf79db62bd75.tar.xz eurephia-b3f80c7922908e7d048c4e691ceadf79db62bd75.zip |
Update efw-iptables version number and API version
As the firewall API has changed in regards to moving a way from
a string based implementation to a struct based implementation, the
older eurephia firewall module will not work any longer.
To make sure nothing bad happens, enforce that the efw-iptables
module is at least using API version 2. Also updated the module
version to reflect some changes as well.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/firewall/eurephiafw.c | 7 | ||||
-rw-r--r-- | plugin/firewall/iptables/efw-iptables.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/plugin/firewall/eurephiafw.c b/plugin/firewall/eurephiafw.c index 9ae126e..d443e76 100644 --- a/plugin/firewall/eurephiafw.c +++ b/plugin/firewall/eurephiafw.c @@ -105,6 +105,11 @@ int eFW_load(eurephiaCTX *ctx, const char *intf) { eurephia_log(ctx, LOG_INFO, 1, "Firewall interface loaded: %s (API version %i)", eFWinterfaceVersion(), eFWinterfaceAPIversion()); + if( eFWinterfaceAPIversion() < 2 ) { + eurephia_log(ctx, LOG_FATAL, 0, "The firewall interface must use API version 2 at minimum."); + return 0; + } + // Configure firewall interface functions switch( eFWinterfaceAPIversion() ) { default: @@ -113,7 +118,7 @@ int eFW_load(eurephiaCTX *ctx, const char *intf) { "familiar with. Please consider to upgrade eurephia to take advantage of newer " "features in the firewall driver."); - case 1: + case 2: eFW_RunFirewall = eGetSym(ctx, ctx->eurephia_fw_intf, "eFW_RunFirewall"); break; diff --git a/plugin/firewall/iptables/efw-iptables.c b/plugin/firewall/iptables/efw-iptables.c index be65d5e..aad5d4f 100644 --- a/plugin/firewall/iptables/efw-iptables.c +++ b/plugin/firewall/iptables/efw-iptables.c @@ -44,8 +44,8 @@ #include <eurephia_log.h> #include <eurephiafw_helpers.h> -#define INTERFACEVER "1.0" /**< The version of this firewall interface (driver) */ -#define INTERFACEAPIVER 1 /**< Define the API level this firewall interface uses. */ +#define INTERFACEVER "1.1" /**< The version of this firewall interface (driver) */ +#define INTERFACEAPIVER 2 /**< Define the API level this firewall interface uses. */ /** * eFWmode string translation table |