Skip to content

Commit

Permalink
validate: do not check NET_ADMIN with ip link add
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
  • Loading branch information
runcom committed Nov 20, 2017
1 parent e7a6236 commit b89043b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/validate/security_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ func createPrivilegedContainer(rc internalapi.RuntimeService, ic internalapi.Ima

// checkNetworkManagement checks the container's network management works fine.
func checkNetworkManagement(rc internalapi.RuntimeService, containerID string, manageable bool) {
cmd := []string{"ip", "link", "add", "dummy0", "type", "dummy"}
cmd := []string{"sh", "-c", "echo 1000 > /sys/class/net/lo/tx_queue_len"}

stdout, stderr, err := rc.ExecSync(containerID, cmd, time.Duration(defaultExecSyncTimeout)*time.Second)
msg := fmt.Sprintf("cmd %v, stdout %q, stderr %q", cmd, stdout, stderr)
Expand Down

0 comments on commit b89043b

Please sign in to comment.