From 40d01001322a8da682038937c3c1f2b8c17c63d8 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sun, 23 Aug 2015 14:59:38 +0200 Subject: [PATCH] Change default IPv6 multicast address (fixes #2090) --- lib/config/config.go | 7 ++++++- lib/config/config_test.go | 2 +- test/h1/config.xml | 2 +- test/h2/config.xml | 2 +- test/h3/config.xml | 2 +- test/h4/config.xml | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/config/config.go b/lib/config/config.go index 40ebdf655..22e14258d 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -218,7 +218,7 @@ type OptionsConfiguration struct { GlobalAnnEnabled bool `xml:"globalAnnounceEnabled" json:"globalAnnounceEnabled" default:"true"` LocalAnnEnabled bool `xml:"localAnnounceEnabled" json:"localAnnounceEnabled" default:"true"` LocalAnnPort int `xml:"localAnnouncePort" json:"localAnnouncePort" default:"21025"` - LocalAnnMCAddr string `xml:"localAnnounceMCAddr" json:"localAnnounceMCAddr" default:"[ff32::5222]:21026"` + LocalAnnMCAddr string `xml:"localAnnounceMCAddr" json:"localAnnounceMCAddr" default:"[ff12::8384]:21027"` RelayServers []string `xml:"relayServer" json:"relayServers" default:"dynamic+https://relays.syncthing.net"` MaxSendKbps int `xml:"maxSendKbps" json:"maxSendKbps"` MaxRecvKbps int `xml:"maxRecvKbps" json:"maxRecvKbps"` @@ -504,6 +504,11 @@ func convertV11V12(cfg *Configuration) { } } + // Use new multicast group + if cfg.Options.LocalAnnMCAddr == "[ff32::5222]:21026" { + cfg.Options.LocalAnnMCAddr = "[ff12::8384]:21027" + } + cfg.Version = 12 } diff --git a/lib/config/config_test.go b/lib/config/config_test.go index 06fbe9f3a..6b746cd13 100644 --- a/lib/config/config_test.go +++ b/lib/config/config_test.go @@ -36,7 +36,7 @@ func TestDefaultValues(t *testing.T) { GlobalAnnEnabled: true, LocalAnnEnabled: true, LocalAnnPort: 21025, - LocalAnnMCAddr: "[ff32::5222]:21026", + LocalAnnMCAddr: "[ff12::8384]:21027", RelayServers: []string{"dynamic+https://relays.syncthing.net"}, MaxSendKbps: 0, MaxRecvKbps: 0, diff --git a/test/h1/config.xml b/test/h1/config.xml index ce6423260..833a0324d 100644 --- a/test/h1/config.xml +++ b/test/h1/config.xml @@ -51,7 +51,7 @@ false true 21025 - [ff32::5222]:21026 + [ff12::8384]:21027 dynamic+https://relays.syncthing.net 0 0 diff --git a/test/h2/config.xml b/test/h2/config.xml index 8e56790b1..cfc5394d5 100644 --- a/test/h2/config.xml +++ b/test/h2/config.xml @@ -55,7 +55,7 @@ false true 21025 - [ff32::5222]:21026 + [ff12::8384]:21027 dynamic+https://relays.syncthing.net 0 0 diff --git a/test/h3/config.xml b/test/h3/config.xml index cba948385..ee34a7821 100644 --- a/test/h3/config.xml +++ b/test/h3/config.xml @@ -44,7 +44,7 @@ false false 21025 - [ff32::5222]:21026 + [ff12::8384]:21027 dynamic+https://relays.syncthing.net 0 0 diff --git a/test/h4/config.xml b/test/h4/config.xml index bbe2863a5..551a42be6 100644 --- a/test/h4/config.xml +++ b/test/h4/config.xml @@ -23,7 +23,7 @@ false false 21025 - [ff32::5222]:21026 + [ff12::8384]:21027 dynamic+https://relays.syncthing.net 0 0