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

Remove the kDNSServiceInterfaceIndexLocalOnly special-case on Darwin. #26287

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

@bzbarsky-apple bzbarsky-apple commented Apr 27, 2023

Interface kDNSServiceInterfaceIndexLocalOnly means the registration is local-only, not that the registered host is localhost and has a loopback address. There can be local-only registrations for other hosts, and we need to do actual address resolution.

To make this work right in our unit test setup, fix our registration code for the local-only case (which tests use) to register hostname -> IP mappings, which it was not doing before.

@bzbarsky-apple
Copy link
Contributor Author

@cecille This looks like it might reintroduce #11891, but I'd really like to understand exactly what was happening there and whether it still happens on tip + this PR... The networking folks tell me that there's nothing that should be special about the local-only interface here.

@github-actions
Copy link

PR #26287: Size comparison from e4d000d to f2654f7

Increases (1 build for cc32xx)
platform target config section e4d000d f2654f7 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 19521971 19521973 2 0.0
Full report (1 build for cc32xx)
platform target config section e4d000d f2654f7 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602714 602714 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956984 956984 0 0.0
.debug_aranges 103664 103664 0 0.0
.debug_frame 350552 350552 0 0.0
.debug_info 19521971 19521973 2 0.0
.debug_line 2682751 2682751 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506147 1506147 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 96278 0 0.0
.debug_str 3059490 3059490 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496340 496340 0 0.0

Interface kDNSServiceInterfaceIndexLocalOnly means the _registration_ is
local-only, not that the registered host is localhost and has a loopback
address.  There can be local-only registrations for other hosts, and we need to
do actual address resolution.

To make this work right in our unit test setup, fix our registration code for
the local-only case (which tests use) to register hostname -> IP mappings, which
it was not doing before.
@bzbarsky-apple bzbarsky-apple force-pushed the remove-localonly-special-case branch from f2654f7 to f075e83 Compare April 28, 2023 16:32
@github-actions
Copy link

PR #26287: Size comparison from 77d72a8 to f075e83

Full report (1 build for cc32xx)
platform target config section 77d72a8 f075e83 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602714 602714 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956984 956984 0 0.0
.debug_aranges 103664 103664 0 0.0
.debug_frame 350552 350552 0 0.0
.debug_info 19521972 19521972 0 0.0
.debug_line 2682751 2682751 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506147 1506147 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 96278 0 0.0
.debug_str 3059490 3059490 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496340 496340 0 0.0

@andy31415 andy31415 merged commit 3d84c9d into project-chip:master May 1, 2023
@bzbarsky-apple bzbarsky-apple deleted the remove-localonly-special-case branch May 1, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants