Skip to content

test: send PTR goodbye via new_multicast_socket and remove _new_socket_bind - #555

Merged
keepsimple1 merged 3 commits into
mainfrom
chore/refactor-only
Nov 21, 2026
Merged

keepsimple1 merged 3 commits into
mainfrom
chore/refactor-only

Conversation

@keepsimple1

Copy link
Copy Markdown
Owner

Test refactoring only.

…t_bind

_new_socket_bind() has been unused by the daemon since #380 switched to
shared IPv4/IPv6 sockets; only test_service_with_temporarily_invalidated_ptr
still called it. The test now uses one new_multicast_socket() per IP family,
and send_dns_outgoing_impl selects the outgoing interface for each send.

This also avoids the raw IPv4 multicast join, which could fail with
AddrInUse on interfaces that share an address.
@keepsimple1
keepsimple1 merged commit e5ee843 into main Nov 21, 2026
6 checks passed
@keepsimple1
keepsimple1 deleted the chore/refactor-only branch November 21, 2026 18:50
Sealdot added a commit to Sealdot/mdns-sd that referenced this pull request Nov 22, 2026
When a probe conflict triggers name_change/hostname_change, the appended ` (n)`/`-n` suffix can push the first label past MAX_LABEL_BYTES, after which write_name rejects every packet and the service silently vanishes.

Shorten the base so the label with the new suffix still fits, like mDNSResponder: measure wire bytes via escape-aware helpers in dns_parser.rs (\. and \\ count as one byte, never cut inside a pair or a UTF-8 char), trim a trailing space/`-`, and recompute on every rename as ` (9)` -> ` (10)` grows the suffix. register_service now rejects an instance label over 63 wire bytes up front instead of failing silently on the network.

Fixes keepsimple1#549.

Rebased onto main @ e5ee843 (keepsimple1#553, keepsimple1#555): test imports union upstream's new_multicast_socket with this change's check_instance_label_length.

AI assistance: Cognition Devin CLI agent (SWE-2 High).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant