diff --git a/lib/config/config.go b/lib/config/config.go
index 22e14258d..8d973b5f1 100644
--- a/lib/config/config.go
+++ b/lib/config/config.go
@@ -217,7 +217,7 @@ type OptionsConfiguration struct {
GlobalAnnServers []string `xml:"globalAnnounceServer" json:"globalAnnounceServers" json:"globalAnnounceServer" default:"udp4://announce.syncthing.net:22027, udp6://announce-v6.syncthing.net:22027"`
GlobalAnnEnabled bool `xml:"globalAnnounceEnabled" json:"globalAnnounceEnabled" default:"true"`
LocalAnnEnabled bool `xml:"localAnnounceEnabled" json:"localAnnounceEnabled" default:"true"`
- LocalAnnPort int `xml:"localAnnouncePort" json:"localAnnouncePort" default:"21025"`
+ LocalAnnPort int `xml:"localAnnouncePort" json:"localAnnouncePort" default:"21027"`
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"`
@@ -509,6 +509,11 @@ func convertV11V12(cfg *Configuration) {
cfg.Options.LocalAnnMCAddr = "[ff12::8384]:21027"
}
+ // Use new local discovery port
+ if cfg.Options.LocalAnnPort == 21025 {
+ cfg.Options.LocalAnnPort = 21027
+ }
+
cfg.Version = 12
}
diff --git a/lib/config/config_test.go b/lib/config/config_test.go
index 6b746cd13..fbb695e0c 100644
--- a/lib/config/config_test.go
+++ b/lib/config/config_test.go
@@ -35,7 +35,7 @@ func TestDefaultValues(t *testing.T) {
GlobalAnnServers: []string{"udp4://announce.syncthing.net:22027", "udp6://announce-v6.syncthing.net:22027"},
GlobalAnnEnabled: true,
LocalAnnEnabled: true,
- LocalAnnPort: 21025,
+ LocalAnnPort: 21027,
LocalAnnMCAddr: "[ff12::8384]:21027",
RelayServers: []string{"dynamic+https://relays.syncthing.net"},
MaxSendKbps: 0,
diff --git a/test/h2/config.xml b/test/h2/config.xml
index cfc5394d5..c44bc00d9 100644
--- a/test/h2/config.xml
+++ b/test/h2/config.xml
@@ -52,7 +52,7 @@
tcp://127.0.0.1:22002
udp4://announce.syncthing.net:22027
udp6://announce-v6.syncthing.net:22027
- false
+ true
true
21025
[ff12::8384]:21027