@@ -9,12 +9,10 @@ import (
9
9
"fmt"
10
10
"net"
11
11
"os/exec"
12
- "path/filepath"
13
12
14
13
"github.com/containers/buildah/pkg/jail"
15
14
"github.com/containers/common/libnetwork/types"
16
15
"github.com/containers/podman/v5/libpod/define"
17
- "github.com/containers/storage/pkg/lockfile"
18
16
"github.com/sirupsen/logrus"
19
17
)
20
18
@@ -46,38 +44,6 @@ type NetstatAddress struct {
46
44
Collisions uint64 `json:"collisions"`
47
45
}
48
46
49
- type RootlessNetNS struct {
50
- dir string
51
- Lock * lockfile.LockFile
52
- }
53
-
54
- // getPath will join the given path to the rootless netns dir
55
- func (r * RootlessNetNS ) getPath (path string ) string {
56
- return filepath .Join (r .dir , path )
57
- }
58
-
59
- // Do - run the given function in the rootless netns.
60
- // It does not lock the rootlessCNI lock, the caller
61
- // should only lock when needed, e.g. for network operations.
62
- func (r * RootlessNetNS ) Do (toRun func () error ) error {
63
- return errors .New ("not supported on freebsd" )
64
- }
65
-
66
- // Cleanup the rootless network namespace if needed.
67
- // It checks if we have running containers with the bridge network mode.
68
- // Cleanup() expects that r.Lock is locked
69
- func (r * RootlessNetNS ) Cleanup (runtime * Runtime ) error {
70
- return errors .New ("not supported on freebsd" )
71
- }
72
-
73
- // GetRootlessNetNs returns the rootless netns object. If create is set to true
74
- // the rootless network namespace will be created if it does not already exist.
75
- // If called as root it returns always nil.
76
- // On success the returned RootlessCNI lock is locked and must be unlocked by the caller.
77
- func (r * Runtime ) GetRootlessNetNs (new bool ) (* RootlessNetNS , error ) {
78
- return nil , nil
79
- }
80
-
81
47
func getSlirp4netnsIP (subnet * net.IPNet ) (* net.IP , error ) {
82
48
return nil , errors .New ("not implemented GetSlirp4netnsIP" )
83
49
}
@@ -264,7 +230,3 @@ func (c *Container) inspectJoinedNetworkNS(networkns string) (q types.StatusBloc
264
230
func (c * Container ) reloadRootlessRLKPortMapping () error {
265
231
return errors .New ("unsupported (*Container).reloadRootlessRLKPortMapping" )
266
232
}
267
-
268
- func (c * Container ) setupRootlessNetwork () error {
269
- return nil
270
- }
0 commit comments