Slight cleanup
This commit is contained in:
1 parent
d59c170cd5
commit
c458deaf80
1 file changed
+5
-8
@@ -101,18 +101,15 @@ func (driver *driver) JoinEndpoint(j *api.JoinRequest) (*api.JoinResponse, error
|
|||||||
driver.logReq("JoinEndpoint", j, fmt.Sprintf("%s:%s to %s", j.NetworkID, j.EndpointID, j.SandboxKey))
|
driver.logReq("JoinEndpoint", j, fmt.Sprintf("%s:%s to %s", j.NetworkID, j.EndpointID, j.SandboxKey))
|
||||||
|
|
||||||
name, peerName := vethPair(j.EndpointID)
|
name, peerName := vethPair(j.EndpointID)
|
||||||
local, err := weavenet.CreateAndAttachVeth(name, peerName, WeaveBridge, 0)
|
if _, err := weavenet.CreateAndAttachVeth(name, peerName, WeaveBridge, 0); err != nil {
|
||||||
if err != nil {
|
|
||||||
return nil, driver.error("JoinEndpoint", "%s", err)
|
return nil, driver.error("JoinEndpoint", "%s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ifname := &api.InterfaceName{
|
|
||||||
SrcName: local.PeerName,
|
|
||||||
DstPrefix: "ethwe",
|
|
||||||
}
|
|
||||||
|
|
||||||
response := &api.JoinResponse{
|
response := &api.JoinResponse{
|
||||||
InterfaceName: ifname,
|
InterfaceName: &api.InterfaceName{
|
||||||
|
SrcName: peerName,
|
||||||
|
DstPrefix: "ethwe",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
if !driver.noMulticastRoute {
|
if !driver.noMulticastRoute {
|
||||||
multicastRoute := api.StaticRoute{
|
multicastRoute := api.StaticRoute{
|
||||||
|
|||||||
Reference in new issue
Block a user