Skip to content

Conversation

bt90
Copy link
Contributor

@bt90 bt90 commented Aug 21, 2023

Purpose

Fixes #7456

The allowed IPv4 ranges are the same as before. But we now also accept IPv6 addresses in the ULA range FC00::/7. These addresses don't require an interface identifier and are roughly equivalent to the IPv4 private ranges.

Typical usecases:

  • VPN interface IPs: Wireguard, OpenVPN, Tailscale, ...
  • fixed IPv6 LAN addressing while the provider assigns a dynamic prefix. e.g used by pihole

https://cs.opensource.google/go/go/+/refs/tags/go1.21.0:src/net/ip.go;l=146

Testing

I checked the output of https://discovery.syncthing.net/?device=xxxxxxxxxxxxxxxxxxxx and my local fd00:: IPs were listed.

@bt90 bt90 changed the title WIP: Switch to IP.IsPrivate() WIP: lib/connections allow IPv6 ULA Aug 21, 2023
@bt90 bt90 marked this pull request as draft August 21, 2023 16:26
@bt90 bt90 changed the title WIP: lib/connections allow IPv6 ULA lib/connections allow IPv6 ULA Aug 22, 2023
@bt90 bt90 marked this pull request as ready for review August 22, 2023 11:48
@bt90 bt90 changed the title lib/connections allow IPv6 ULA lib/connections: allow IPv6 ULA Aug 22, 2023
@bt90
Copy link
Contributor Author

bt90 commented Aug 23, 2023

@calmh any objections?

Copy link
Member

@calmh calmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is about discovery? The title says "lib/connections: allow ..." but we allow connections to/from all addresses by default always.

@bt90
Copy link
Contributor Author

bt90 commented Aug 23, 2023

This is strictly discovery related, yes.

@bt90 bt90 changed the title lib/connections: allow IPv6 ULA lib/connections: allow IPv6 ULA in discovery Aug 23, 2023
@bt90 bt90 requested a review from calmh August 23, 2023 09:39
@calmh calmh merged commit 467522d into syncthing:main Aug 23, 2023
@calmh calmh added this to the v1.24.0 milestone Aug 23, 2023
@bt90 bt90 deleted the bt90-patch-2 branch August 23, 2023 10:34
calmh added a commit to calmh/syncthing that referenced this pull request Aug 29, 2023
* main:
  gui, man, authors: Update docs, translations, and contributors
  cmd/stdiscosrv: Separate HTTPS and replication certificates
  cmd/stdiscosrv: Use larger database settings
  cmd/stdiscosrv: Modernise TLS settings, remove excessive HTTP logging
  cmd/stdiscosrv: Serve compressed responses
  lib/connections: Allow IPv6 ULA in discovery announcements (fixes syncthing#7456) (syncthing#9048)
calmh added a commit to calmh/syncthing that referenced this pull request Sep 1, 2023
* main: (121 commits)
  build: Update dependencies
  gui: Remove footer and move links to header (fixes syncthing#5607) (syncthing#9067)
  gui: Fix lastSeenDays error due to undefined deviceStats when adding new devices (ref syncthing#8730) (syncthing#9066)
  gui: Automatically select device ID on click (ref syncthing#8544) (syncthing#9065)
  gui: Prevent modifications when saving changes (fixes syncthing#9019) (syncthing#9063)
  gui: Show in GUI if limitBandwidthInLan is enabled (syncthing#9062)
  lib/upgrade: Enable HTTP/2 for upgrade checks (syncthing#9060)
  lib/discover: Enable HTTP/2 for global discovery requests (syncthing#9059)
  cmd/stdiscosrv: Streamline context handling
  cmd/stdiscosrv: Explicitly enable HTTP/2
  gui, man, authors: Update docs, translations, and contributors
  cmd/stdiscosrv: Separate HTTPS and replication certificates
  cmd/stdiscosrv: Use larger database settings
  cmd/stdiscosrv: Modernise TLS settings, remove excessive HTTP logging
  cmd/stdiscosrv: Serve compressed responses
  lib/connections: Allow IPv6 ULA in discovery announcements (fixes syncthing#7456) (syncthing#9048)
  lib/beacon: Check FlagRunning (syncthing#9051)
  all: Remove lib/util package (syncthing#9049)
  lib/model: Clean up index handler life cycle (fixes syncthing#9021) (syncthing#9038)
  lib/osutil, lib/upnp: Check FlagRunning (fixes syncthing#8767) (syncthing#9047)
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Aug 22, 2024
@syncthing syncthing locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Announce IPv6 ULA
3 participants