Advertise mDNS proto=punktfunk/2 from the host in 0.45.0 #1861

Open
opened 2026-10-13 17:51:05 +00:00 by enricobuehler · 0 comments
Owner

The host answers punktfunk/2 only, but its _punktfunk._udp advert still says proto=punktfunk/1. Flip it in 0.45.0, not before.

Why not in 0.44.0

A 0.43.x Linux, Windows or Android client drops any advert whose proto is not exactly punktfunk/1 (crates/punktfunk-core/src/discovery.rs at v0.43.1: proto != PROTO). 0.43.1 already speaks punktfunk/2, so a 0.44.0 host has to stay visible to it.

Client half: done, ships in 0.44.0

  • 8e89086d3 (#1724) widened the shared filter to accept punktfunk/1 and punktfunk/2. Linux, Windows, Android, the CLI and the probe all go through it (punktfunk_core::discovery::advert_from_txt). No release tag contains it yet; 0.44.0 is the first.
  • Apple (clients/apple/Sources/PunktfunkKit/Connection/HostDiscovery.swift), webOS (client-webos, src/services/discovery.rs) and the web client's server (client-web, server/src/hosts.rs) never read proto. Every shipped version of those keeps working.

Host half: to do

  • crates/host/punktfunk-host/src/hostsys/discovery.rs: NATIVE_PROTO becomes "punktfunk/2". Rewrite the proto line of the module doc with it.
  • crates/core/punktfunk-core/src/discovery.rs: the PROTOS comment says hosts still advertise punktfunk/1. Keep both values in the list, so a 0.45 client still lists a 0.44 host.
  • Fixtures that spell the old value: the core discovery.rs tests and clients/apple/Tests/PunktfunkKitTests/HostDiscoveryTests.swift.

What it costs

After the flip a 0.43.x Linux, Windows or Android client no longer lists a 0.45 host on the LAN. A saved host or a typed address still connects. The 0.45.0 release notes should say so.

Check

  • cargo test -p punktfunk-core --features quic --lib discovery
  • A 0.44.0 client of each kind lists a 0.45 host.
The host answers `punktfunk/2` only, but its `_punktfunk._udp` advert still says `proto=punktfunk/1`. Flip it in **0.45.0**, not before. ## Why not in 0.44.0 A 0.43.x Linux, Windows or Android client drops any advert whose `proto` is not exactly `punktfunk/1` (`crates/punktfunk-core/src/discovery.rs` at `v0.43.1`: `proto != PROTO`). 0.43.1 already speaks `punktfunk/2`, so a 0.44.0 host has to stay visible to it. ## Client half: done, ships in 0.44.0 - `8e89086d3` (#1724) widened the shared filter to accept `punktfunk/1` and `punktfunk/2`. Linux, Windows, Android, the CLI and the probe all go through it (`punktfunk_core::discovery::advert_from_txt`). No release tag contains it yet; 0.44.0 is the first. - Apple (`clients/apple/Sources/PunktfunkKit/Connection/HostDiscovery.swift`), webOS (`client-webos`, `src/services/discovery.rs`) and the web client's server (`client-web`, `server/src/hosts.rs`) never read `proto`. Every shipped version of those keeps working. ## Host half: to do - `crates/host/punktfunk-host/src/hostsys/discovery.rs`: `NATIVE_PROTO` becomes `"punktfunk/2"`. Rewrite the `proto` line of the module doc with it. - `crates/core/punktfunk-core/src/discovery.rs`: the `PROTOS` comment says hosts still advertise `punktfunk/1`. Keep both values in the list, so a 0.45 client still lists a 0.44 host. - Fixtures that spell the old value: the core `discovery.rs` tests and `clients/apple/Tests/PunktfunkKitTests/HostDiscoveryTests.swift`. ## What it costs After the flip a 0.43.x Linux, Windows or Android client no longer lists a 0.45 host on the LAN. A saved host or a typed address still connects. The 0.45.0 release notes should say so. ## Check - `cargo test -p punktfunk-core --features quic --lib discovery` - A 0.44.0 client of each kind lists a 0.45 host.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#1861