Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit db04a2bd authored by Mike Yu's avatar Mike Yu
Browse files

Retry binding sockets in DNSResponder if errno is EADDRNOTAVAIL

Tests fail in DNSResponder::startServer() when DNSResponder is binding
the socket while the address is still being set up. This change provides
a simple fix to address this problem because the tests are unaware of
onInterfaceAddressUpdated.

Below is a real failure log:

// device log
04-22 00:29:07.854  root   802   802 I netd    : interfaceAddAddress("testtun10002", "2001:db8:2::202", 128) <1.51ms>
04-22 00:29:07.855  root  6745  6745 E DNSResponder: failed to bind UDP 2001:db8:2::202:53: Cannot assign requested address

// dumpsys netd
04-22 00:29:07.857 onInterfaceAddressUpdated(2001:db8:2::202/128, testtun10002, 128, 0) (0.04ms)

Bug: 186181084
Bug: 175269391
Test: run ResolverMultinetworkTest.GetAddrInfo_AI_ADDRCONFIG 100 times
Change-Id: I8e8824c9056bd298e0e689adfbc720abaa45fcd4
parent 82ae84b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment