Skip to content

Commit

Permalink
Use more chars from endpointID to reduce clashes
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Jun 29, 2016
1 parent ceb5f8c commit 8f45b9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/net/driver.go
Expand Up @@ -100,7 +100,7 @@ func (driver *driver) CreateEndpoint(create *api.CreateEndpointRequest) (*api.Cr
return nil, driver.error("CreateEndpoint", "Not supported: creating an interface from within CreateEndpoint")
}

// create veths. note we assume endpoint IDs are unique in the first 5 chars
// create veths. note we assume endpoint IDs are unique in the first 8 chars
name, peerName := vethPair(create.EndpointID)
if _, err := weavenet.CreateAndAttachVeth(name, peerName, weavenet.WeaveBridgeName, 0, false, nil); err != nil {
return nil, driver.error("JoinEndpoint", "%s", err)
Expand Down Expand Up @@ -211,7 +211,7 @@ func (driver *driver) DiscoverDelete(disco *api.DiscoveryNotification) error {
}

func vethPair(id string) (string, string) {
return "vethwl" + id[:5], "vethwg" + id[:5]
return "vethwl" + id[:8], "vethwg" + id[:8]
}

// logging
Expand Down

0 comments on commit 8f45b9e

Please sign in to comment.