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

Gracefully handle non-DNS-SD results from DNSServiceGetAddrInfo. #24715

Conversation

bzbarsky-apple
Copy link
Contributor

If we don't do this, then we'll add an entry to "interfaces" that does not have most of the necessary data defined, and if we pick that interface to then report to whatever started the resolve, things will fail out.

If we don't do this, then we'll add an entry to "interfaces" that does not have
most of the necessary data defined, and if we pick that interface to then report
to whatever started the resolve, things will fail out.
@github-actions
Copy link

github-actions bot commented Jan 28, 2023

PR #24715: Size comparison from fe24ee2 to d4dcaec

Increases (6 builds for bl702, cc13x2_26x2, esp32, telink)
platform target config section fe24ee2 d4dcaec change % change
bl702 lighting-app bl702+rpc .debug_info 44594412 44594413 1 0.0
.text 1029342 1029344 2 0.0
cc13x2_26x2 shell LP_CC2652R7 (read/write) 185496 185504 8 0.0
esp32 all-clusters-app m5stack (read/write) 497823 497827 4 0.0
.flash.rodata 248900 248904 4 0.0
telink all-clusters-minimal-app tlsr9518adk80d (read/write) 953336 953344 8 0.0
text 648508 648510 2 0.0
light-switch-app tlsr9518adk80d text 593614 593616 2 0.0
ota-requestor-app tlsr9518adk80d text 604982 604984 2 0.0
Decreases (4 builds for cc13x2_26x2, cyw30739, psoc6, qpg)
platform target config section fe24ee2 d4dcaec change % change
cc13x2_26x2 shell LP_CC2652R7 (read only) 668558 668550 -8 -0.0
.text 584040 584032 -8 -0.0
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 550822 550814 -8 -0.0
.app_xip_area 432328 432320 -8 -0.0
psoc6 all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27063670 27063669 -1 -0.0
qpg lock-app qpg6105+debug (read/write) 1116056 1116048 -8 -0.0
.text 563152 563144 -8 -0.0
Full report (43 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section fe24ee2 d4dcaec change % change
bl602 lighting-app bl602 (read/write) 1345482 1345482 0 0.0
.bss 94858 94858 0 0.0
.data 9736 9736 0 0.0
.text 1022520 1022520 0 0.0
bl602+rpc (read/write) 1390930 1390930 0 0.0
.bss 102906 102906 0 0.0
.data 10128 10128 0 0.0
.text 1053454 1053454 0 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1184951 1184951 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 70701 70701 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4056 4056 0 0.0
.debug_abbrev 1549986 1549986 0 0.0
.debug_aranges 134056 134056 0 0.0
.debug_frame 490996 490996 0 0.0
.debug_info 40198121 40198121 0 0.0
.debug_line 5267150 5267150 0 0.0
.debug_loc 3401859 3401859 0 0.0
.debug_ranges 371928 371928 0 0.0
.debug_str 3535090 3535090 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 106704 106704 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 571692 571692 0 0.0
.symtab 173184 173184 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
952356 952356 0 0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1277579 1277579 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 78749 78749 0 0.0
.bss_psram 30304 30304 0 0.0
.comment 48 48 0 0.0
.data 4608 4608 0 0.0
.debug_abbrev 1698382 1698382 0 0.0
.debug_aranges 142280 142280 0 0.0
.debug_frame 518700 518700 0 0.0
.debug_info 44594412 44594413 1 0.0
.debug_line 5665475 5665475 0 0.0
.debug_loc 3597998 3597998 0 0.0
.debug_ranges 395632 395632 0 0.0
.debug_str 3938399 3938399 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 121232 121232 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 632289 632289 0 0.0
.symtab 191536 191536 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1029342 1029344 2 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 677311 677311 0 0.0
(read/write) 174672 174672 0 0.0
.bss 81676 81676 0 0.0
.data 3384 3384 0 0.0
.rodata 87471 87471 0 0.0
.text 589524 589524 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641391 641391 0 0.0
(read/write) 158368 158368 0 0.0
.bss 80868 80868 0 0.0
.data 3384 3384 0 0.0
.rodata 77423 77423 0 0.0
.text 563648 563648 0 0.0
lock-ftd LP_CC2652R7 (read only) 674379 674379 0 0.0
(read/write) 174948 174948 0 0.0
.bss 79108 79108 0 0.0
.data 3312 3312 0 0.0
.rodata 76267 76267 0 0.0
.text 597632 597632 0 0.0
lock-mtd LP_CC2652R7 (read only) 660727 660727 0 0.0
(read/write) 183864 183864 0 0.0
.bss 74372 74372 0 0.0
.data 3312 3312 0 0.0
.rodata 102735 102735 0 0.0
.text 557512 557512 0 0.0
pump-app LP_CC2652R7 (read only) 687443 687443 0 0.0
(read/write) 162612 162612 0 0.0
.bss 79068 79068 0 0.0
.data 3276 3276 0 0.0
.rodata 90395 90395 0 0.0
.text 596568 596568 0 0.0
pump-controller-app LP_CC2652R7 (read only) 672875 672875 0 0.0
(read/write) 177292 177292 0 0.0
.bss 79180 79180 0 0.0
.data 3300 3300 0 0.0
.rodata 86475 86475 0 0.0
.text 585920 585920 0 0.0
shell LP_CC2652R7 (read only) 668558 668550 -8 -0.0
(read/write) 185496 185504 8 0.0
.bss 83748 83748 0 0.0
.data 3380 3380 0 0.0
.rodata 84206 84206 0 0.0
.text 584040 584032 -8 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 585458 585458 0 0.0
.app_xip_area 461476 461476 0 0.0
.bss 66432 66432 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589182 589182 0 0.0
.app_xip_area 459904 459904 0 0.0
.bss 71720 71720 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 550822 550814 -8 -0.0
.app_xip_area 432328 432320 -8 -0.0
.bss 60984 60984 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974160 974160 0 0.0
.bss 147152 147152 0 0.0
.data 2196 2196 0 0.0
.text 824792 824792 0 0.0
BRD4161A+rs911x (read/write) 1037212 1037212 0 0.0
.bss 181632 181632 0 0.0
.data 2040 2040 0 0.0
.text 853520 853520 0 0.0
BRD4187C (read/write) 1151328 1151328 0 0.0
.bss 133652 133652 0 0.0
.data 2544 2544 0 0.0
.text 990536 990536 0 0.0
lock-app BRD4161A+wf200 (read/write) 1064836 1064836 0 0.0
.bss 153152 153152 0 0.0
.data 2048 2048 0 0.0
.text 909616 909616 0 0.0
window-app BRD4187C (read/write) 1146240 1146240 0 0.0
.bss 135164 135164 0 0.0
.data 2572 2572 0 0.0
.text 983908 983908 0 0.0
esp32 all-clusters-app c3devkit (read only) 1042098 1042098 0 0.0
(read/write) 1516178 1516178 0 0.0
.dram0.bss 76032 76032 0 0.0
.dram0.data 13792 13792 0 0.0
.flash.rodata 220136 220136 0 0.0
.flash.text 1042098 1042098 0 0.0
.iram0.text 72896 72896 0 0.0
m5stack (read only) 1094279 1094279 0 0.0
(read/write) 497823 497827 4 0.0
.dram0.bss 81080 81080 0 0.0
.dram0.data 34072 34072 0 0.0
.flash.rodata 248900 248904 4 0.0
.flash.text 1088895 1088895 0 0.0
.iram0.text 124855 124855 0 0.0
k32w contact k32w0+release (read/write) 660940 660940 0 0.0
.bss 77360 77360 0 0.0
.data 2112 2112 0 0.0
.text 562356 562356 0 0.0
light k32w0+release (read/write) 672884 672884 0 0.0
.bss 75144 75144 0 0.0
.data 2064 2064 0 0.0
.text 592948 592948 0 0.0
lock k32w0+release (read/write) 632320 632320 0 0.0
.bss 75912 75912 0 0.0
.data 2084 2084 0 0.0
.text 551596 551596 0 0.0
linux chip-tool-ipv6only arm64 (read only) 11041532 11041532 0 0.0
(read/write) 698024 698024 0 0.0
.bss 34248 34248 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 641448 641448 0 0.0
.dynamic 560 560 0 0.0
.got 14120 14120 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 576188 576188 0 0.0
.text 8812644 8812644 0 0.0
thermostat-no-ble arm64 (read only) 2506604 2506604 0 0.0
(read/write) 144680 144680 0 0.0
.bss 56456 56456 0 0.0
.data 1824 1824 0 0.0
.data.rel.ro 76968 76968 0 0.0
.dynamic 560 560 0 0.0
.got 5392 5392 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 150856 150856 0 0.0
.text 2093920 2093920 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2463256 2463256 0 0.0
.bss 215956 215956 0 0.0
.data 5880 5880 0 0.0
.text 1425900 1425900 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1165296 1165296 0 0.0
bss 147246 147246 0 0.0
rodata 133352 133352 0 0.0
text 804472 804472 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1366864 1366864 0 0.0
bss 106546 106546 0 0.0
rodata 210832 210832 0 0.0
text 763636 763636 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1111544 1111544 0 0.0
bss 146402 146402 0 0.0
rodata 110496 110496 0 0.0
text 774540 774540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 840808 840808 0 0.0
(read/write) 1755764 1755764 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189864 189864 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2672 2672 0 0.0
.debug_abbrev 1251453 1251453 0 0.0
.debug_aranges 111280 111280 0 0.0
.debug_frame 373636 373636 0 0.0
.debug_info 27505917 27505917 0 0.0
.debug_line 3778983 3778983 0 0.0
.debug_loc 3673163 3673163 0 0.0
.debug_ranges 362248 362248 0 0.0
.debug_str 3485010 3485010 0 0.0
.heap 840808 840808 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 577246 577246 0 0.0
.symtab 424288 424288 0 0.0
.text 0 0 0 0.0
1554840 1554840 0 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 841624 841624 0 0.0
(read/write) 1697644 1697644 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189056 189056 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1237164 1237164 0 0.0
.debug_aranges 110544 110544 0 0.0
.debug_frame 376080 376080 0 0.0
.debug_info 27063670 27063669 -1 -0.0
.debug_line 3787349 3787349 0 0.0
.debug_loc 3656893 3656893 0 0.0
.debug_ranges 360216 360216 0 0.0
.debug_str 3470763 3470763 0 0.0
.heap 841624 841624 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 538662 538662 0 0.0
.symtab 409728 409728 0 0.0
.text 1497536 1497536 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 849944 849944 0 0.0
(read/write) 1611196 1611196 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180936 180936 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1072030 1072030 0 0.0
.debug_aranges 102800 102800 0 0.0
.debug_frame 346624 346624 0 0.0
.debug_info 22491102 22491102 0 0.0
.debug_line 3340154 3340154 0 0.0
.debug_loc 3336443 3336443 0 0.0
.debug_ranges 319440 319440 0 0.0
.debug_str 3274787 3274787 0 0.0
.heap 849944 849944 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 474072 474072 0 0.0
.symtab 377632 377632 0 0.0
.text 1419408 1419408 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 844960 844960 0 0.0
(read/write) 1645260 1645260 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185912 185912 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1073378 1073378 0 0.0
.debug_aranges 103184 103184 0 0.0
.debug_frame 348424 348424 0 0.0
.debug_info 22711757 22711757 0 0.0
.debug_line 3341884 3341884 0 0.0
.debug_loc 3358062 3358062 0 0.0
.debug_ranges 321296 321296 0 0.0
.debug_str 3291194 3291194 0 0.0
.heap 844960 844960 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 477007 477007 0 0.0
.symtab 379456 379456 0 0.0
.text 1448488 1448488 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1148352 1148352 0 0.0
.bss 100668 100668 0 0.0
.data 848 848 0 0.0
.text 595452 595452 0 0.0
lock-app qpg6105+debug (read/write) 1116056 1116048 -8 -0.0
.bss 97188 97188 0 0.0
.data 860 860 0 0.0
.text 563152 563144 -8 -0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1016676 1016676 0 0.0
bss 98776 98776 0 0.0
text 686128 686128 0 0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 953336 953344 8 0.0
bss 97824 97824 0 0.0
text 648508 648510 2 0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 858792 858792 0 0.0
bss 89948 89948 0 0.0
text 579488 579488 0 0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 874572 874572 0 0.0
bss 90036 90036 0 0.0
text 593614 593616 2 0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 951888 951888 0 0.0
bss 98184 98184 0 0.0
text 659010 659010 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 888732 888732 0 0.0
bss 90984 90984 0 0.0
text 604982 604984 2 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 878772 878772 0 0.0
bss 91424 91424 0 0.0
text 595188 595188 0 0.0

@Abhayakara
Copy link

I don’t think this is a good approach. If the network is answering dnssd queries using dns, that’s legitimate. Dnssd queries can go to unicast resolvers. So if you discard that data, it’s going to cause serious problems as unicast dnssd becomes more common, which we definitely want.

I think it would be better to dig into why this response is actually causing a problem.

@bzbarsky-apple
Copy link
Contributor Author

I think it would be better to dig into why this response is actually causing a problem.

That part I can tell you pretty easily. The current structure of the operational code is as follows:

  1. It takes as input the instance name and type to resolve (in practice the operational instance name and _matter._tcp).
  2. It calls DNSServiceResolve with that information.
  3. It gets some callbacks to the DNSServiceResolveReply it provides. For each callback it takes the passed-in information (fullname, hosttarget, port, TXT records), and stores them in a map keyed by the passed-in interface index.
  4. At the point when we get a DNSServiceResolveReply callback without kDNSServiceFlagsMoreComing, we iterate over that map and for each entry call DNSServiceGetAddrInfo, passing it the interface index and hosttarget.
  5. When the DNSServiceGetAddrInfoReply callback is called, we look up the entry in the map by interface index and add the IP address to the list in that entry. This operation, due to the way std::map works, adds an entry if there isn't one already, but that entry would then not have any of the hostname/TXT/port information.
  6. Once we get DNSServiceGetAddrInfoReply without kDNSServiceFlagsMoreComing we look through the map for an entry with IP addresses in it, and pass that the information in it (interface index, port, TXT records, IP addresses) to whoever asked us to resolve the instance name. We just use the first entry that has IP addresses.

What was causing problems is that we ended up with an entry in the map that had an IP address but none of the other information, so when we passed that to the API consumer it couldn't make sense of it. Hence this proposed fix: do not add entries to the map that are not already there from step 3 above.

If we wanted to make use of this response, with the current structure of the code, we would need to match up the response with the right (port, TXT records, etc) metadata somehow. I suppose we could do that by changing what we use as the context for the DNSServiceGetAddrInfo call to not just be a pointer to our overall context for the resolve operation but to also include the interface index involved. Or we could restructure all of the above, if it's not making assumptions that we could make, or making assumptions that we should not make... Thoughts?

@Abhayakara
Copy link

Interesting. So if all the answers came back with interface zero, that would have worked? If so, then I think grouping by interface would be the right solution. But why didn't this work, given that you did have valid answers on the interface that the PTR/TXT/SRV came in on?

@bzbarsky-apple
Copy link
Contributor Author

So if all the answers came back with interface zero, that would have worked?

If the answers to DNSServiceResolve came with interface 0, then having the IPs also come with that interface would have "worked" in the sense that we would have at least tried connecting to the IPs (but see my question below).

But why didn't this work, given that you did have valid answers on the interface that the PTR/TXT/SRV came in on?

Because in step 6 above we basically have to select one interface to hand back results for because the API surface there only allows one "result" containing TXT record, port, etc, with multiple IPs). That code was just checking for "has IPs", not "has all the other info", and ended up selecting interface 0 just because of the order the map got enumerated in: that one came first.

We could have changed that code to ignore map entries for which we don't have the SRV/TXT/port bits, by the way; that is functionally identical to the fix here (which just avoids adding such entries to the map to start with).

I think the concreate questions I have about the behavior of the underlying APIs are:

  1. Can we get a result from DNSServiceGetAddrInfo that:
    a. Claims interface index 0 (i.e. unicast response).
    b. Has a link-local IP address?
  2. Can we get a result from DNSServiceGetAddrInfo that has interface index not 0 but also not the one we passed
    into DNSServiceGetAddrInfo? And again, can that be a link-local address?

And if the answers to the above are "yes", then which interface index should be used as the scope for trying to talk to those link-local addresses in both cases?

@Abhayakara
Copy link

I’m not convinced that the current api behavior is correct. If you specify the interface, a response not on that interface seems problematic.

But leaving that aside for the moment, because that’s a discussion for the service discovery team and not just me, I think grouping answers by interface should be correct. And not returning an incomplete answer is better than just dropping answers on interface 0.

We should have a discussion about the interface issue separately.

@bzbarsky-apple
Copy link
Contributor Author

I think grouping answers by interface should be correct.

Just to make sure we are talking about the same thing: you mean grouping answers by the interface index we passed into DNSServiceGetAddrInfo, not the interface index that was passed to our DNSServiceGetAddrInfoReply implementation?

@Abhayakara
Copy link

I meant the info in the reply, actually. The info you got on index 0 seems like a non sequitur to me, and you got the same answer on the requested interface.

The situation you are seeing here is actually a misconfigured local resolver. If you had gotten a real dnssd response on interface 0, it would have been complete.

@bzbarsky-apple
Copy link
Contributor Author

I meant the info in the reply, actually.

OK, that's what we are doing now....

The info you got on index 0 seems like a non sequitur to me,

The real question is what we should do with that info. The proposed change is to basically discard it if we did not get SRV/TXT records on the same interface.

The situation you are seeing here is actually a misconfigured local resolver. If you had gotten a real dnssd response on interface 0, it would have been complete.

As in, I would have gotten a response to DNSServiceResolve on interface 0 too? In that case everything would have worked fine without the proposed change, as well as with the proposed change.

@Abhayakara
Copy link

Yes, unicast dnssd would deliver all the records with interface ==0.

@yufengwangca yufengwangca merged commit 1ceb906 into project-chip:master Jan 30, 2023
@bzbarsky-apple bzbarsky-apple deleted the darwin-ignore-unicast-resolves branch January 30, 2023 17:46
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…ject-chip#24715)

If we don't do this, then we'll add an entry to "interfaces" that does not have
most of the necessary data defined, and if we pick that interface to then report
to whatever started the resolve, things will fail out.
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.

5 participants