Unless you changed the name of the alias, or the interface on the rule, it should be detected properly:
function easyrule_block_rule_exists($int = 'wan') {
global $blockaliasname, $config;
/* No rules, we we know it doesn't exist */
if (!is_array($config['filter']['rule'])) {
return false;
}
/* Search through the rules for one referencing our alias */
foreach ($config['filter']['rule'] as $rule)
if (!is_array($rule) || !is_array($rule['source']))
continue;
if ($rule['source']['address'] == $blockaliasname . strtoupper($int) && ($rule['interface'] == $int))
return true;
return false;
}
I'll see what I can do about making it add the rule at the top.