Fix address family check in extractIpAddressAnswers()
Per Mike's finding in aosp/2185522, inet_ntop() doesn't return an error when converting a IPv4 string from an IPv6 network address. That means that using expectAnswersValid(.., AF_INET, ..) to check IPv6 RRs will pass. extractIpAddressAnswers() fails to check the address family. Check the RR type to make sure the RR contains the expected address family type. Bug: 242681575 Test: atest CtsNetTestCasesLatestSdk:MultinetworkApiTest Change-Id: Ieb67513afac0d97971ba4ddab8ceff03eddf6f45
Loading
Please register or sign in to comment