File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -606,14 +606,22 @@ iptables_fw_access_host(fw_access_t type, const char *host)
606
606
int
607
607
iptables_fw_auth_unreachable (int tag )
608
608
{
609
- return iptables_do_command ("-t mangle -A " CHAIN_AUTH_IS_DOWN " -j MARK --set-mark 0x%u" , tag );
609
+ int got_authdown_ruleset = NULL == get_ruleset (FWRULESET_AUTH_IS_DOWN ) ? 0 : 1 ;
610
+ if (got_authdown_ruleset )
611
+ return iptables_do_command ("-t mangle -A " CHAIN_AUTH_IS_DOWN " -j MARK --set-mark 0x%u" , tag );
612
+ else
613
+ return 1 ;
610
614
}
611
615
612
616
/** Remove mark when auth server is reachable again */
613
617
int
614
618
iptables_fw_auth_reachable (void )
615
619
{
616
- return iptables_do_command ("-t mangle -F " CHAIN_AUTH_IS_DOWN );
620
+ int got_authdown_ruleset = NULL == get_ruleset (FWRULESET_AUTH_IS_DOWN ) ? 0 : 1 ;
621
+ if (got_authdown_ruleset )
622
+ return iptables_do_command ("-t mangle -F " CHAIN_AUTH_IS_DOWN );
623
+ else
624
+ return 1 ;
617
625
}
618
626
619
627
/** Update the counters of all the clients in the client list */
You can’t perform that action at this time.
0 commit comments