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
Pre-decompressed DNS record RData that may contain compression pointers #9311
Conversation
Can one of the admins verify this patch? |
codec-dns/src/main/java/io/netty/handler/codec/dns/DnsCodecUtil.java
Outdated
Show resolved
Hide resolved
codec-dns/src/main/java/io/netty/handler/codec/dns/DnsCodecUtil.java
Outdated
Show resolved
Hide resolved
codec-dns/src/main/java/io/netty/handler/codec/dns/DnsCodecUtil.java
Outdated
Show resolved
Hide resolved
codec-dns/src/main/java/io/netty/handler/codec/dns/DnsCodecUtil.java
Outdated
Show resolved
Hide resolved
@netty-bot test this please |
codec-dns/src/main/java/io/netty/handler/codec/dns/DnsCodecUtil.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two more nits then we are good to go... thanks a lot!
ByteBuf buffer = Unpooled.wrappedBuffer(compressionPointer); | ||
ByteBuf uncomporessed = null; | ||
try { | ||
uncomporessed = DnsCodecUtil.decompressDomainName(buffer.duplicate().setIndex(10, 12)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo... should be "uncompressed"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
codec-dns/src/test/java/io/netty/handler/codec/dns/DefaultDnsRecordDecoderTest.java
Outdated
Show resolved
Hide resolved
@netty-bot test this please |
@qeesung thanks a lot! |
…rs (#9311) Motivation: When decoding DnsRecord, if the record contains compression pointers, and not all compression pointers are decompressed, but part of the pointers are decompressed. Then when encoding the record, the compressed pointer will point to the wrong location, resulting in bad label problem. Modification: Pre-decompressed record RData that may contain compression pointers. Result: Fixes #8962
Motivation:
When decoding
DnsRecord
, if the record contains compression pointers, and not all compression pointers are decompressed, but part of the pointers are decompressed. Then when encoding the record, the compressed pointer will point to the wrong location, resulting in bad label problem.Modification:
Pre-decompressed record RData that may contain compression pointers.
Result:
Fixes #8962