summaryrefslogtreecommitdiffstats
path: root/eurephia.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-08-25 02:05:48 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-08-25 02:05:48 +0200
commit32788f6eba3c51e0bea1fc23baea75dd1a01022e (patch)
tree038478862a06a29e371176932c7d1c05e31f5f81 /eurephia.c
parentc98902db2f6c89642eede09ed1d0d1de3318e2a2 (diff)
downloadeurephia-32788f6eba3c51e0bea1fc23baea75dd1a01022e.tar.gz
eurephia-32788f6eba3c51e0bea1fc23baea75dd1a01022e.tar.xz
eurephia-32788f6eba3c51e0bea1fc23baea75dd1a01022e.zip
Added first attempt to make the firewall interface communictate
Diffstat (limited to 'eurephia.c')
-rw-r--r--eurephia.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eurephia.c b/eurephia.c
index 97d2e6b..15dc927 100644
--- a/eurephia.c
+++ b/eurephia.c
@@ -395,7 +395,7 @@ int eurephia_learn_address(eurephiaCTX *ctx, const char *mode, const char *macad
eurephia_log(ctx, LOG_DEBUG, 21, "** Function call: eurephia_learn_address(ctx, '%s', '%s', ...)",
mode, macaddr);
- fw_enabled = (atoi_nullsafe(eGet_value(ctx->dbc->config, "firewall_enabled")) == 1);
+ fw_enabled = (eGet_value(ctx->dbc->config, "firewall_interface") != NULL);
if( strncmp(mode, "add", 3) == 0 ) {
// Fetch needed info
@@ -420,6 +420,7 @@ int eurephia_learn_address(eurephiaCTX *ctx, const char *mode, const char *macad
if( fw_enabled ) {
// 1. Lookup firewall profile for user: eDBget_firewall_profile(ctx, session)
// 2. Update firewall with eurephia_firewall(ctx, FWRULE_ADD, profileid)
+ eFW_UpdateFirewall(ctx, FWRULE_ADD, macaddr);
}
eDBfree_session(ctx, session);
@@ -428,6 +429,7 @@ int eurephia_learn_address(eurephiaCTX *ctx, const char *mode, const char *macad
// FIXME: FIREWALL UPDATE - remove rule for the current MAC address
if( fw_enabled ) {
// 1. Update firewall with eurephia_firewall(ctx, FWRULE_DELETE, macaddr)
+ eFW_UpdateFirewall(ctx, FWRULE_DELETE, macaddr);
}