AWSVPC mode now part of BridgeConfig

This commit is contained in:
Bryan Boreham committed 2017-04-17 19:41:47 +00:00
1 parent 833eb6166f
commit abadbf883a
2 files changed
+14 -9

No files matched your search

+7 -1
View File
@@ -61,7 +61,8 @@ func DetectBridgeType(weaveBridgeName, datapathName string) BridgeType {
return Fastdp
case isDatapath(datapath) && isBridge(bridge):
return BridgedFastdp
// TODO: AWSVPC
// We cannot detect AWSVPC here; it looks just like Bridge.
// Anyone who cares will have to know some other way.
default:
return Inconsistent
}
@@ -177,6 +178,7 @@ type BridgeConfig struct {
DatapathName string
NoFastdp bool
NoBridgedFastdp bool
IsAWSVPC bool
ExpectNPC bool
MTU int
Mac string
@@ -223,6 +225,10 @@ func CreateBridge(config *BridgeConfig) (BridgeType, error) {
}
}
if config.IsAWSVPC {
bridgeType = AWSVPC
}
if bridgeType == Bridge {
if err := EthtoolTXOff(config.WeaveBridgeName); err != nil {
return bridgeType, err