File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,12 @@ fn main() {
13
13
let mut pf = PfCtl :: new ( ) . expect ( "Unable to connect to PF" ) ;
14
14
15
15
for anchor_name in env:: args ( ) . skip ( 1 ) {
16
- match pf. flush_rules ( & anchor_name, pfctl:: RulesetKind :: Filter ) {
17
- Ok ( _) => println ! ( "Flushed filter rules under anchor {}" , anchor_name) ,
18
- err => err. expect ( "Unable to flush filter rules" ) ,
19
- }
20
- match pf. flush_rules ( & anchor_name, pfctl:: RulesetKind :: Redirect ) {
21
- Ok ( _) => println ! ( "Flushed redirect rules under anchor {}" , anchor_name) ,
22
- err => err. expect ( "Unable to flush redirect rules" ) ,
23
- }
16
+ pf. flush_rules ( & anchor_name, pfctl:: RulesetKind :: Filter )
17
+ . expect ( "Unable to flush filter rules" ) ;
18
+ println ! ( "Flushed filter rules under anchor {}" , anchor_name) ;
19
+
20
+ pf. flush_rules ( & anchor_name, pfctl:: RulesetKind :: Redirect )
21
+ . expect ( "Unable to flush redirect rules" ) ;
22
+ println ! ( "Flushed redirect rules under anchor {}" , anchor_name) ;
24
23
}
25
24
}
You can’t perform that action at this time.
0 commit comments