refactor(ish): parameterise dp creation by iface, not name

This commit is contained in:
Matthias Radestock committed 2016-03-30 14:07:33 +01:00
1 parent 8eb52538de
commit 0f89f8562f
2 files changed
+5 -10

No files matched your search

+2 -2
View File
@@ -348,9 +348,9 @@ func createOverlay(datapathName string, ifaceName string, host string, port int,
case datapathName != "" && ifaceName != "":
Log.Fatal("At most one of --datapath and --iface must be specified.")
case datapathName != "":
_, err := weavenet.EnsureInterface(datapathName)
iface, err := weavenet.EnsureInterface(datapathName)
checkFatal(err)
fastdp, err := weave.NewFastDatapath(datapathName, port)
fastdp, err := weave.NewFastDatapath(iface, port)
checkFatal(err)
bridge = fastdp.Bridge()
overlay.Add("fastdp", fastdp.Overlay())