forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request containers#15425 from dfr/freebsd-boltdb
libpod: Add definition of containerPlatformState for FreeBSD
- Loading branch information
Showing
4 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//go:build freebsd | ||
// +build freebsd | ||
|
||
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 | ||
return nil | ||
} | ||
|
||
// getNetNSPath retrieves the netns path to be stored in the database | ||
func getNetNSPath(ctr *Container) string { | ||
return ctr.state.NetworkJail | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//go:build !linux | ||
// +build !linux | ||
//go:build !linux && !freebsd | ||
// +build !linux,!freebsd | ||
|
||
package libpod | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build freebsd | ||
// +build freebsd | ||
|
||
package libpod | ||
|
||
type containerPlatformState struct { | ||
// NetworkJail is the name of the container's network VNET | ||
// jail. Will only be set if config.CreateNetNS is true, or | ||
// the container was told to join another container's network | ||
// namespace. | ||
NetworkJail string `json:"-"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//go:build !linux | ||
// +build !linux | ||
//go:build !linux && !freebsd | ||
// +build !linux,!freebsd | ||
|
||
package libpod | ||
|
||
|