remove "encryption -> pcap" cruft
As of e12dbb460 (#1758) we no longer force the usage of pcap when
encryption is enabled. Hence...
- we no longer need to figure out whether the router was started with
a password when re-attaching it from the proxy. We therefore remove
the code for that.
- there is no longer any mode in which we pass both `--datapath` and
`--iface` options to the router. Previously this would only happen
when encryption was enabled and the only overlay used for
connections was sleeve. It is not clear what the behaviour is when
these conditions do not hold, so, to be safe, we prevent the
specification of both flags.
This commit is contained in:
1 parent
29ebeeaff5
commit
799160c5c2
2 files changed
+5
-14
No files matched your search
+5
-13
@@ -128,23 +128,15 @@ func main() {
|
||||
config.ProtocolMinVersion = byte(protocolMinVersion)
|
||||
|
||||
overlays := weave.NewOverlaySwitch()
|
||||
if datapathName != "" {
|
||||
// A datapath name implies that "Bridge" and "Overlay"
|
||||
// packet handling use fast datapath, although other
|
||||
// options can override that below. Even if both
|
||||
// things are overridden, we might need bridging on
|
||||
// the datapath.
|
||||
switch {
|
||||
case datapathName != "" && ifaceName != "":
|
||||
Log.Fatal("At most one of --datapath and --iface must be specified.")
|
||||
case datapathName != "":
|
||||
fastdp, err := weave.NewFastDatapath(datapathName, config.Port)
|
||||
checkFatal(err)
|
||||
networkConfig.Bridge = fastdp.Bridge()
|
||||
overlays.Add("fastdp", fastdp.Overlay())
|
||||
}
|
||||
if ifaceName != "" {
|
||||
// -iface can coexist with -datapath, because
|
||||
// pcap-based packet capture is a bit more efficient
|
||||
// than capture via ODP misses, even when using an
|
||||
// ODP-based bridge. So when using weave encyption,
|
||||
// it's preferable to use -iface.
|
||||
case ifaceName != "":
|
||||
var err error
|
||||
iface, err = weavenet.EnsureInterface(ifaceName)
|
||||
checkFatal(err)
|
||||
|
||||
@@ -1622,7 +1622,6 @@ fetch_router_args() {
|
||||
CONTAINER_ARGS=$(docker inspect -f '{{.Args}}' $CONTAINER_NAME)
|
||||
IPRANGE=$(echo $CONTAINER_ARGS | grep -o -e '-ipalloc-range [^ ]*') || true
|
||||
NO_DNS_OPT=$(echo $CONTAINER_ARGS | grep -o -e '--no-dns') || true
|
||||
WEAVE_PASSWORD=$(docker inspect -f '{{.Config.Env}}' $CONTAINER_NAME | sed -n -e 's/.*WEAVE_PASSWORD=\([^] ]*\).*/\1/p')
|
||||
}
|
||||
|
||||
attach_router() {
|
||||
|
||||
Reference in new issue
Block a user