File tree Expand file tree Collapse file tree 4 files changed +6
-1
lines changed
Expand file tree Collapse file tree 4 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ impl App {
356356 . networking
357357 . as_ref ( )
358358 . unwrap_or ( & self . config . cvm . networking ) ;
359- if !networking. is_bridge ( ) {
359+ if !networking. is_bridge ( ) || !networking . forward_service_enabled {
360360 return ;
361361 }
362362 let guest_ip = vm. state . guest_ip . clone ( ) ;
Original file line number Diff line number Diff line change @@ -384,6 +384,9 @@ pub struct Networking {
384384 #[ serde( default ) ]
385385 pub bridge : String ,
386386
387+ /// Enable userspace port forwarding for bridge-mode VMs.
388+ pub forward_service_enabled : bool ,
389+
387390 // ── MAC prefix ─────────────────────────────────────────────────
388391 /// Fixed MAC address prefix (0-3 colon-separated hex bytes, e.g. "02:ab:cd").
389392 /// Remaining bytes are derived from the VM ID hash.
Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ fn networking_from_proto(proto: &rpc::NetworkingConfig) -> Option<crate::config:
229229 no_map_gw : false ,
230230 ipv4_only : false ,
231231 netdev : String :: new ( ) ,
232+ forward_service_enabled : false ,
232233 } )
233234}
234235
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ ipv4_only = true
9999
100100# for mode = "bridge"
101101# bridge = "virbr0"
102+ forward_service_enabled = false
102103
103104[cvm .port_mapping ]
104105enabled = false
You can’t perform that action at this time.
0 commit comments