@@ -1193,34 +1193,6 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
11931193 cmd .ExtraFiles = append (cmd .ExtraFiles , ctr .reservedPorts ... )
11941194 ctr .reservedPorts = nil
11951195 }
1196-
1197- if ctr .config .NetMode .IsSlirp4netns () || rootless .IsRootless () {
1198- if ctr .config .PostConfigureNetNS {
1199- havePortMapping := len (ctr .config .PortMappings ) > 0
1200- if havePortMapping {
1201- ctr .rootlessPortSyncR , ctr .rootlessPortSyncW , err = os .Pipe ()
1202- if err != nil {
1203- return 0 , fmt .Errorf ("failed to create rootless port sync pipe: %w" , err )
1204- }
1205- }
1206- ctr .rootlessSlirpSyncR , ctr .rootlessSlirpSyncW , err = os .Pipe ()
1207- if err != nil {
1208- return 0 , fmt .Errorf ("failed to create rootless network sync pipe: %w" , err )
1209- }
1210- }
1211-
1212- if ctr .rootlessSlirpSyncW != nil {
1213- defer errorhandling .CloseQuiet (ctr .rootlessSlirpSyncW )
1214- // Leak one end in conmon, the other one will be leaked into slirp4netns
1215- cmd .ExtraFiles = append (cmd .ExtraFiles , ctr .rootlessSlirpSyncW )
1216- }
1217-
1218- if ctr .rootlessPortSyncW != nil {
1219- defer errorhandling .CloseQuiet (ctr .rootlessPortSyncW )
1220- // Leak one end in conmon, the other one will be leaked into rootlessport
1221- cmd .ExtraFiles = append (cmd .ExtraFiles , ctr .rootlessPortSyncW )
1222- }
1223- }
12241196 var runtimeRestoreStarted time.Time
12251197 if restoreOptions != nil {
12261198 runtimeRestoreStarted = time .Now ()
0 commit comments