@@ -49,10 +49,6 @@ const (
4949 // should be used.
5050 // Only used with the network namespace, invalid otherwise.
5151 Bridge NamespaceMode = "bridge"
52- // Slirp indicates that a slirp4netns network stack should
53- // be used.
54- // Only used with the network namespace, invalid otherwise.
55- Slirp NamespaceMode = "slirp4netns"
5652 // Pasta indicates that a pasta network stack should be used.
5753 // Only used with the network namespace, invalid otherwise.
5854 Pasta NamespaceMode = "pasta"
@@ -158,8 +154,6 @@ func validateNetNS(n *Namespace) error {
158154 return nil
159155 }
160156 switch n .NSMode {
161- case Slirp :
162- break
163157 case Pasta :
164158 // Check if we run rootless/in a userns. Do not use rootless.IsRootless() here.
165159 // Pasta switches to nobody when running as root which causes it to fail while
@@ -181,7 +175,7 @@ func validateNetNS(n *Namespace) error {
181175 if len (n .Value ) < 1 {
182176 return fmt .Errorf ("namespace mode %s requires a value" , n .NSMode )
183177 }
184- } else if n . NSMode != Slirp {
178+ } else {
185179 // All others except must NOT set a string value
186180 if len (n .Value ) > 0 {
187181 return fmt .Errorf ("namespace value %s cannot be provided with namespace mode %s" , n .Value , n .NSMode )
@@ -211,7 +205,7 @@ func (n *Namespace) validate() error {
211205 switch n .NSMode {
212206 case "" , Default , Host , Path , FromContainer , FromPod , Private :
213207 // Valid, do nothing
214- case NoNetwork , Bridge , Slirp , Pasta :
208+ case NoNetwork , Bridge , Pasta :
215209 return errors .New ("cannot use network modes with non-network namespace" )
216210 default :
217211 return fmt .Errorf ("invalid namespace type %s specified" , n .NSMode )
@@ -337,13 +331,6 @@ func ParseNetworkFlag(networks []string) (Namespace, map[string]types.PerNetwork
337331 podmanNetworks := make (map [string ]types.PerNetworkOptions )
338332
339333 switch {
340- case ns == string (Slirp ), strings .HasPrefix (ns , string (Slirp )+ ":" ):
341- key , options , hasOptions := strings .Cut (ns , ":" )
342- if hasOptions {
343- networkOptions = make (map [string ][]string )
344- networkOptions [key ] = strings .Split (options , "," )
345- }
346- toReturn .NSMode = Slirp
347334 case ns == string (FromPod ):
348335 toReturn .NSMode = FromPod
349336 case ns == "" || ns == string (Default ) || ns == string (Private ):
@@ -416,7 +403,7 @@ func ParseNetworkFlag(networks []string) (Namespace, map[string]types.PerNetwork
416403 return toReturn , nil , nil , fmt .Errorf ("network name cannot be empty: %w" , define .ErrInvalidArg )
417404 }
418405 if slices .Contains ([]string {
419- string (Bridge ), string (Slirp ), string ( Pasta ), string (FromPod ), string (NoNetwork ),
406+ string (Bridge ), string (Pasta ), string (FromPod ), string (NoNetwork ),
420407 string (Default ), string (Private ), string (Path ), string (FromContainer ), string (Host ),
421408 }, name ) {
422409 return toReturn , nil , nil , fmt .Errorf ("can only set extra network names, selected mode %s conflicts with bridge: %w" , name , define .ErrInvalidArg )
0 commit comments