summaryrefslogtreecommitdiffstats
path: root/plugin/firewall/eurephiafw.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-11-30 22:51:17 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-30 22:51:17 +0100
commitb3f80c7922908e7d048c4e691ceadf79db62bd75 (patch)
tree29d9c2dc68e8edaa3384718373f5208ead878c1f /plugin/firewall/eurephiafw.c
parentd04d1d78c04b60a406bc5a24c004264f43af520f (diff)
downloadeurephia-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/firewall/eurephiafw.c')
-rw-r--r--plugin/firewall/eurephiafw.c7
1 files changed, 6 insertions, 1 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;