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

Function getIP6AddressOpts

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

Source from the content-addressed store, hash-verified

405}
406
407func getIP6AddressOpts(opts *handlerOpts) ([]cni.NamespaceOpts, error) {
408 if opts.containerIP6 != "" {
409 if rootlessutil.IsRootlessChild() {
410 log.L.Debug("container IP6 assignment is not fully supported in rootless mode. The IP6 is not accessible from the host (but still accessible from other containers).")
411 }
412 return []cni.NamespaceOpts{
413 cni.WithLabels(map[string]string{
414 // allow loose CNI argument verification
415 // FYI: https://github.com/containernetworking/cni/issues/560
416 "IgnoreUnknown": "1",
417 }),
418 cni.WithCapability("ips", []string{opts.containerIP6}),
419 }, nil
420 }
421 return nil, nil
422}
423
424func reserveSocket(protocol, hostAddr string) (*os.File, error) {
425 type filer interface {

Callers 2

applyNetworkSettingsFunction · 0.85
onPostStopFunction · 0.85

Calls 1

IsRootlessChildFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…