summaryrefslogtreecommitdiff
path: root/pkg/namespaces
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-07-16 12:19:51 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-07-16 22:37:27 +0200
commit9be7029cdd4736f3ac33004e4364e3e7f3bd1db5 (patch)
tree3471bf92af256dc4006f84a5f8fa4bcda090cdc2 /pkg/namespaces
parent8d12f19371eb9d91139f7b982cde2926ec8c8e74 (diff)
downloadpodman-9be7029cdd4736f3ac33004e4364e3e7f3bd1db5.tar.gz
podman-9be7029cdd4736f3ac33004e4364e3e7f3bd1db5.tar.bz2
podman-9be7029cdd4736f3ac33004e4364e3e7f3bd1db5.zip
libpod: pass down network options
do not pass network specific options through the network namespace. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/namespaces')
-rw-r--r--pkg/namespaces/namespaces.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/pkg/namespaces/namespaces.go b/pkg/namespaces/namespaces.go
index b4ec04699..7831af8f9 100644
--- a/pkg/namespaces/namespaces.go
+++ b/pkg/namespaces/namespaces.go
@@ -17,9 +17,7 @@ const (
nsType = "ns"
podType = "pod"
privateType = "private"
- rlkFwdType = "port_handler=rootlesskit"
shareableType = "shareable"
- slirpFwdType = "port_handler=slirp4netns"
slirpType = "slirp4netns"
)
@@ -390,28 +388,6 @@ func (n NetworkMode) IsSlirp4netns() bool {
return n == slirpType || strings.HasPrefix(string(n), slirpType+":")
}
-// IsPortForwardViaRootlessKit indicates if we are doing rootless port-forwarding via rootlesskit/rootlessport
-func (n NetworkMode) IsPortForwardViaRootlessKit() bool {
- if !n.IsSlirp4netns() {
- return false
- }
- parts := strings.SplitN(string(n), ":", 2)
- if len(parts) == 2 {
- return parts[1] == rlkFwdType
- }
- return true
-}
-
-// IsPortForwardViaSlirpHostFwd indicates if we are doing rootless port-forwarding via slirp4netns add_hostfwd()
-func (n NetworkMode) IsPortForwardViaSlirpHostFwd() bool {
- if !n.IsSlirp4netns() {
- return false
- }
- // below here, implied IsSlirp4netns() == true
- parts := strings.SplitN(string(n), ":", 2)
- return len(parts) > 1 && parts[1] == slirpFwdType
-}
-
// IsNS indicates a network namespace passed in by path (ns:<path>)
func (n NetworkMode) IsNS() bool {
return strings.HasPrefix(string(n), nsType)