MCPcopy Create free account
hub / github.com/containerd/nerdctl / getMACAddressOpts

Function getMACAddressOpts

pkg/ocihook/ocihook.go:393–405  ·  view source on GitHub ↗
(opts *handlerOpts)

Source from the content-addressed store, hash-verified

391}
392
393func getMACAddressOpts(opts *handlerOpts) ([]cni.NamespaceOpts, error) {
394 if opts.containerMAC != "" {
395 return []cni.NamespaceOpts{
396 cni.WithLabels(map[string]string{
397 // allow loose CNI argument verification
398 // FYI: https://github.com/containernetworking/cni/issues/560
399 "IgnoreUnknown": "1",
400 }),
401 cni.WithArgs("MAC", opts.containerMAC),
402 }, nil
403 }
404 return nil, nil
405}
406
407func getIP6AddressOpts(opts *handlerOpts) ([]cni.NamespaceOpts, error) {
408 if opts.containerIP6 != "" {

Callers 2

applyNetworkSettingsFunction · 0.85
onPostStopFunction · 0.85

Calls 1

WithArgsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…