@@ -1170,33 +1170,6 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
11701170 ctr .reservedPorts = nil
11711171 }
11721172
1173- if ctr .config .NetMode .IsSlirp4netns () || rootless .IsRootless () {
1174- if ctr .config .PostConfigureNetNS {
1175- havePortMapping := len (ctr .config .PortMappings ) > 0
1176- if havePortMapping {
1177- ctr .rootlessPortSyncR , ctr .rootlessPortSyncW , err = os .Pipe ()
1178- if err != nil {
1179- return 0 , fmt .Errorf ("failed to create rootless port sync pipe: %w" , err )
1180- }
1181- }
1182- ctr .rootlessSlirpSyncR , ctr .rootlessSlirpSyncW , err = os .Pipe ()
1183- if err != nil {
1184- return 0 , fmt .Errorf ("failed to create rootless network sync pipe: %w" , err )
1185- }
1186- }
1187-
1188- if ctr .rootlessSlirpSyncW != nil {
1189- defer errorhandling .CloseQuiet (ctr .rootlessSlirpSyncW )
1190- // Leak one end in conmon, the other one will be leaked into slirp4netns
1191- cmd .ExtraFiles = append (cmd .ExtraFiles , ctr .rootlessSlirpSyncW )
1192- }
1193-
1194- if ctr .rootlessPortSyncW != nil {
1195- defer errorhandling .CloseQuiet (ctr .rootlessPortSyncW )
1196- // Leak one end in conmon, the other one will be leaked into rootlessport
1197- cmd .ExtraFiles = append (cmd .ExtraFiles , ctr .rootlessPortSyncW )
1198- }
1199- }
12001173 var runtimeRestoreStarted time.Time
12011174 if restoreOptions != nil {
12021175 runtimeRestoreStarted = time .Now ()
0 commit comments