File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,12 @@ import (
1111 "github.com/containernetworking/plugins/pkg/ns"
1212 "github.com/pkg/errors"
1313 localPkg "github.com/threefoldtech/zosbase/pkg"
14+ "github.com/threefoldtech/zosbase/pkg/netbase/nft"
1415 "github.com/threefoldtech/zosbase/pkg/netlight/bridge"
1516 "github.com/threefoldtech/zosbase/pkg/netlight/ifaceutil"
1617 "github.com/threefoldtech/zosbase/pkg/netlight/namespace"
1718 "github.com/threefoldtech/zosbase/pkg/netlight/options"
1819 "github.com/threefoldtech/zosbase/pkg/netlight/tuntap"
19- "github.com/threefoldtech/zosbase/pkg/netbase/nft"
2020 "github.com/threefoldtech/zosbase/pkg/zinit"
2121 "github.com/vishvananda/netlink"
2222)
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ import (
3939
4040const (
4141 myceliumInterfaceName = "br-my"
42+ publicNamespaceName = "public"
43+ publicInterfaceName = "public"
4244)
4345
4446var (
@@ -308,8 +310,14 @@ func (nr *NetResource) SetMycelium() (err error) {
308310 "--peers" ,
309311 }
310312
311- // set mycelium public addresses are the private peers
312- ips , err := baseifaceutil .GetIPsForIFace (ndmz .DmzPub4 , ndmz .DmzNamespace )
313+ // set mycelium public addresses as the private peers
314+ mycNamespace , mycInterface := ndmz .DmzNamespace , ndmz .DmzPub4
315+ if namespace .Exists (publicNamespaceName ) {
316+ mycNamespace = publicNamespaceName
317+ mycInterface = publicInterfaceName
318+ }
319+
320+ ips , err := baseifaceutil .GetIPsForIFace (mycInterface , mycNamespace )
313321 if err != nil {
314322 return errors .Wrap (err , "failed to get IPs for npub4" )
315323 }
You can’t perform that action at this time.
0 commit comments