Skip to content
This repository was archived by the owner on Apr 3, 2018. It is now read-only.

Commit 37dc3c6

Browse files
committed
cni: Assign the netpair for virtual endpoints after scan
In addition to the DNS, we need to copy the netpair struct as well from the endpoint structures we created prior to the network creation to the endpoints created after scanning the network. This is needed for creating the tap and bridge interfaces for virtual endpoints. Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
1 parent 8f846a2 commit 37dc3c6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cni.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ func (n *cni) updateEndpointsFromScan(networkNS *NetworkNamespace) error {
132132
prop := endpoint.Properties()
133133
prop.DNS = ep.Properties().DNS
134134
endpoint.SetProperties(prop)
135+
136+
switch e := endpoint.(type) {
137+
case *VirtualEndpoint:
138+
e.NetPair = ep.(*VirtualEndpoint).NetPair
139+
}
135140
break
136141
}
137142
}

0 commit comments

Comments
 (0)