summaryrefslogtreecommitdiff
path: root/libpod/boltdb_state_freebsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/boltdb_state_freebsd.go')
-rw-r--r--libpod/boltdb_state_freebsd.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/libpod/boltdb_state_freebsd.go b/libpod/boltdb_state_freebsd.go
index d7f2736fc..d0a2d4f28 100644
--- a/libpod/boltdb_state_freebsd.go
+++ b/libpod/boltdb_state_freebsd.go
@@ -6,12 +6,20 @@ package libpod
// replaceNetNS handle network namespace transitions after updating a
// container's state.
func replaceNetNS(netNSPath string, ctr *Container, newState *ContainerState) error {
- // On FreeBSD, we just record the network jail's name in our state.
- newState.NetworkJail = netNSPath
+ if netNSPath != "" {
+ // On FreeBSD, we just record the network jail's name in our state.
+ newState.NetNS = &jailNetNS{Name: netNSPath}
+ } else {
+ newState.NetNS = nil
+ }
return nil
}
// getNetNSPath retrieves the netns path to be stored in the database
func getNetNSPath(ctr *Container) string {
- return ctr.state.NetworkJail
+ if ctr.state.NetNS != nil {
+ return ctr.state.NetNS.Name
+ } else {
+ return ""
+ }
}