Only do ethtool tx off in bridged (pcap) mode.

Detect the bridge type in the same way the weave script does.
This commit is contained in:
Bryan Boreham committed 2016-05-25 17:34:13 +01:00
1 parent 2702b85ee5
commit 6dd109a5bb
4 files changed
+66 -21

No files matched your search

+1 -5
View File
@@ -15,10 +15,6 @@ import (
"github.com/weaveworks/weave/plugin/skel"
)
const (
WeaveBridge = "weave"
)
type driver struct {
scope string
noMulticastRoute bool
@@ -101,7 +97,7 @@ 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))
name, peerName := vethPair(j.EndpointID)
if _, err := weavenet.CreateAndAttachVeth(name, peerName, WeaveBridge, 0, nil); err != nil {
if _, err := weavenet.CreateAndAttachVeth(name, peerName, weavenet.WeaveBridgeName, 0, nil); err != nil {
return nil, driver.error("JoinEndpoint", "%s", err)
}