Using netns to perform socat
This commit removes the usage of nsenter and uses netns to perform socat operation. Signed-off-by: abhi <abhi@docker.com>
This commit is contained in:
@@ -117,3 +117,10 @@ func (n *NetNS) GetPath() string {
|
||||
defer n.Unlock()
|
||||
return n.ns.Path()
|
||||
}
|
||||
|
||||
// GetNs returns the network namespace handle
|
||||
func (n *NetNS) GetNs() cnins.NetNS {
|
||||
n.Lock()
|
||||
defer n.Unlock()
|
||||
return n.ns
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user