From 60faabcbe279f5e2464340614de138e775f20728 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Thu, 19 Mar 2015 11:07:20 +0000 Subject: [PATCH] Print LANs on startup --- cmd/syncthing/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index bcecfce0d..4ca717ec1 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -486,8 +486,13 @@ func syncthingMain() { readRateLimit = ratelimit.NewBucketWithRate(float64(1000*opts.MaxRecvKbps), int64(5*1000*opts.MaxRecvKbps)) } - if opts.MaxRecvKbps > 0 || opts.MaxSendKbps > 0 { + if (opts.MaxRecvKbps > 0 || opts.MaxSendKbps > 0) && !opts.LimitBandwidthInLan { lans, _ = osutil.GetLans() + networks := make([]string, 0, len(lans)) + for _, lan := range lans { + networks = append(networks, lan.String()) + } + l.Infoln("Local networks:", strings.Join(networks, ", ")) } dbFile := filepath.Join(confDir, "index")