From b3f80c7922908e7d048c4e691ceadf79db62bd75 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Tue, 30 Nov 2010 22:51:17 +0100 Subject: 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 --- plugin/firewall/eurephiafw.c | 7 ++++++- plugin/firewall/iptables/efw-iptables.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'plugin/firewall') 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 #include -#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 -- cgit