Skip to content
Commit f38ae8a6 authored by Hungming Chen's avatar Hungming Chen Committed by Nucca Chen
Browse files

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
parent 454531a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment