DNS64: return both synthesized IPv6 address and queried IPv4 address
Return both synthesized AAAA records and queried A records when
AF_UNSPEC is specified.
Bug: 159305929
Test: unit test
$ atest resolv_integration_test
Test: manual test:
query a domain name which has A record only
- Prepartion:
i. reboot
ii. connect to IPv6 only network (GoogleGuest)
iii. block ipv4.google.com AAAA dns query
$ adb shell "ip6tables -A OUTPUT -p udp --dport 53 -m string --algo bm --hex-string \"|04 69 70 76 34 06 67 6f 6f 67 6c 65 03 63 6f 6d 00 00 1c 00 01|\" -j DROP"
iv. build and push dnschk to device
$ make -j4 dnschk
$ adb push out/target/product/raven/system/bin/dnschk /data
$ adb shell chmod 755 /data/dnschk
- Test:
case A: without this commit --> IPv6 only (as expected)
$ adb shell /data/dnschk ipv4.google.com
# ipv4.google.com (via nethandle 0):
64:ff9b::8efb:2aee
case B: with this commit --> IPv6 + IPv4 (as expected)
$ adb shell /data/dnschk ipv4.google.com
# ipv4.google.com (via nethandle 0):
64:ff9b::8efb:2aee
142.251.42.238
Change-Id: I4e2f88d0fe961313c40af7cd1e54766029cf5f91
Loading
Please register or sign in to comment