File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
use rpn_predicate_interpreter:: PredicateEvaluator ;
2
2
use serde:: { Deserialize , Serialize } ;
3
3
4
+ use crate :: constants:: BLACKLIST_LINK ;
4
5
use crate :: firewall:: infix_firewall:: InfixFirewall ;
5
6
use crate :: firewall:: rules:: { FirewallExpression , FirewallRule } ;
6
7
use crate :: proto:: appguard_commands:: FirewallPolicy ;
@@ -47,7 +48,14 @@ impl Firewall {
47
48
) -> FirewallResult {
48
49
// first let's check if this is blacklisted
49
50
if item. is_blacklisted ( ) {
50
- return FirewallResult :: new ( FirewallPolicy :: Deny , vec ! [ "IP is blacklisted" . to_string( ) ] ) ;
51
+ return FirewallResult :: new (
52
+ FirewallPolicy :: Deny ,
53
+ vec ! [ format!(
54
+ "IP {} is blacklisted by {}" ,
55
+ item. get_remote_ip( ) ,
56
+ BLACKLIST_LINK . as_str( )
57
+ ) ] ,
58
+ ) ;
51
59
}
52
60
// if not blacklisted, check the firewall expressions one by one
53
61
for expr in & self . expressions {
You can’t perform that action at this time.
0 commit comments