From 9be7029cdd4736f3ac33004e4364e3e7f3bd1db5 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 16 Jul 2020 12:19:51 +0200 Subject: libpod: pass down network options do not pass network specific options through the network namespace. Signed-off-by: Giuseppe Scrivano --- libpod/options.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libpod/options.go') diff --git a/libpod/options.go b/libpod/options.go index b3c11ebc1..32748a3c1 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1003,6 +1003,19 @@ func WithStaticIP(ip net.IP) CtrCreateOption { } } +// WithNetworkOptions sets additional options for the networks. +func WithNetworkOptions(options map[string][]string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + + ctr.config.NetworkOptions = options + + return nil + } +} + // WithStaticMAC indicates that the container should request a static MAC from // the CNI plugins. // It cannot be set unless WithNetNS has already been passed. -- cgit v1.2.3-54-g00ecf