@@ -10,6 +10,7 @@ use super::router::RouterTargetClass;
1010use super :: router:: RouterTargetInternal ;
1111use crate :: api:: ExternalIpCfg ;
1212use crate :: api:: SetExternalIpsReq ;
13+ use crate :: api:: stat:: * ;
1314use crate :: cfg:: IpCfg ;
1415use crate :: cfg:: Ipv4Cfg ;
1516use crate :: cfg:: Ipv6Cfg ;
@@ -47,7 +48,6 @@ use opte::engine::rule::Rule;
4748use opte:: engine:: snat:: ConcreteIpAddr ;
4849use opte:: engine:: snat:: SNat ;
4950use uuid:: Uuid ;
50- use crate :: api:: stat:: * ;
5151
5252pub const NAT_LAYER_NAME : & str = "nat" ;
5353const FLOATING_ONE_TO_ONE_NAT_PRIORITY : u16 = 5 ;
@@ -291,8 +291,11 @@ fn setup_ipv4_nat(
291291 let snat = Arc :: new ( snat) ;
292292
293293 for igw_id in igw_matches {
294- let mut rule =
295- Rule :: new_with_id ( SNAT_PRIORITY , Action :: Stateful ( snat. clone ( ) ) , Some ( NAT_SNAT_V4 ) ) ;
294+ let mut rule = Rule :: new_with_id (
295+ SNAT_PRIORITY ,
296+ Action :: Stateful ( snat. clone ( ) ) ,
297+ Some ( NAT_SNAT_V4 ) ,
298+ ) ;
296299
297300 rule. add_predicate ( Predicate :: InnerEtherType ( vec ! [
298301 EtherTypeMatch :: Exact ( ETHER_TYPE_IPV4 ) ,
@@ -440,8 +443,11 @@ fn setup_ipv6_nat(
440443 let snat = Arc :: new ( snat) ;
441444
442445 for igw_id in igw_matches {
443- let mut rule =
444- Rule :: new_with_id ( SNAT_PRIORITY , Action :: Stateful ( snat. clone ( ) ) , Some ( NAT_SNAT_V6 ) ) ;
446+ let mut rule = Rule :: new_with_id (
447+ SNAT_PRIORITY ,
448+ Action :: Stateful ( snat. clone ( ) ) ,
449+ Some ( NAT_SNAT_V6 ) ,
450+ ) ;
445451
446452 rule. add_predicate ( Predicate :: InnerEtherType ( vec ! [
447453 EtherTypeMatch :: Exact ( ETHER_TYPE_IPV6 ) ,
0 commit comments