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

LookupSession assumes to follow redirects with Type.CNAME #279

Closed
OrientationZero opened this issue Feb 12, 2023 · 1 comment
Closed

LookupSession assumes to follow redirects with Type.CNAME #279

OrientationZero opened this issue Feb 12, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@OrientationZero
Copy link

OrientationZero commented Feb 12, 2023

hello,

dig www.baidu.com result like this:
www.baidu.com.    IN CNAME www.a.shifen.com.
www.a.shifen.com. IN A          163.177.151.100
www.a.shifen.com. IN A          163.177.151.99

my code like this:

        LookupSession look = LookupSession.defaultBuilder().build();
        Name name = Name.fromString("www.baidu.com");
        look.lookupAsync(name, Type.CNAME)
                .thenAccept(f -> System.out.println(f))
                .toCompletableFuture().get();

result is :
LookupResult(records=[], aliases=[www.baidu.com.])

but I expect CNAME record:
www.baidu.com. IN CNAME www.a.shifen.com.

But using Lookup can do right thing,so what should I do?

@ibauersachs ibauersachs changed the title When using LookupSession query Type.CNAME,can not return C record LookupSession assumes to follow redirects with Type.CNAME Feb 17, 2023
@ibauersachs
Copy link
Member

This is indeed a bug. As a workaround you can use a Resolver directly or use the non-async (and thus legacy) Lookup class.

@ibauersachs ibauersachs self-assigned this Aug 1, 2023
@ibauersachs ibauersachs added this to the v3.5.3 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants