Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/osutil, lib/upnp: Check FlagRunning #9047

Merged
merged 5 commits into from
Aug 21, 2023
Merged

Conversation

bt90
Copy link
Contributor

@bt90 bt90 commented Aug 21, 2023

Fixes #8767

@bt90
Copy link
Contributor Author

bt90 commented Aug 21, 2023

I'm a bit confused why we skip this check on Windows:

syncthing/lib/upnp/upnp.go

Lines 102 to 103 in ccec8a4

// Interface flags seem to always be 0 on Windows
if !build.IsWindows && (intf.Flags&net.FlagUp == 0 || intf.Flags&net.FlagMulticast == 0) {

go seems to populate the flags:

https://go.googlesource.com/go/+/refs/heads/master/src/net/interface_windows.go#47

@calmh
Copy link
Member

calmh commented Aug 21, 2023

The code / comment is almost a decade old. Please feel free to disprove it.

@bt90
Copy link
Contributor Author

bt90 commented Aug 21, 2023

golang/go#10530

@calmh calmh enabled auto-merge (squash) August 21, 2023 14:47
@calmh calmh merged commit c2c6133 into syncthing:main Aug 21, 2023
22 checks passed
@calmh calmh added this to the v1.24.0 milestone Aug 23, 2023
@bt90 bt90 deleted the bt90-patch-1 branch August 23, 2023 10:34
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 20, 2024
@syncthing syncthing locked and limited conversation to collaborators Aug 20, 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.

Check interface for FlagRunning
3 participants