Absolute DNS name are supported
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- networking
Research direction
Start at the UdpTransportExecutor entry point and reproduce the provided PHP example with a trailing-dot name such as www.google.com.. Trace how the Query name is handled before the UDP request is sent, then verify that A and AAAA queries resolve successfully for absolute DNS names.
Written by the indexing model from the issue text.
Description
The UdpTransportExecutor does not correctly handle FQDN with a trailing dot, such as google.com.. This notation is often used for in-cluster DNS queries and ensures efficiency by telling the resolver not to search using local domain suffixes. When passing such names, the resolution fails.
use React\Dns\Model\Message;
use React\Dns\Query\Query;
use React\Dns\Query\UdpTransportExecutor;
$executor = new UdpTransportExecutor('8.8.8.8:53');
$name = $argv[1] ?? 'www.google.com.';
$ipv4Query = new Query($name, Message::TYPE_A, Message::CLASS_IN);
$ipv6Query = new Query($name, Message::TYPE_AAAA, Message::CLASS_IN);
$executor->query($ipv4Query)->then(function (Message $message) {
foreach ($message->answers as $answer) {
echo 'IPv4: ' . $answer->data . PHP_EOL;
}
}, 'printf');
$executor->query($ipv6Query)->then(function (Message $message) {
foreach ($message->answers as $answer) {
echo 'IPv6: ' . $answer->data . PHP_EOL;
}
}, 'printf');
I tested on php8.4, react/socket v1.16.0, react/dns v1.13.0
- Dominant language
- PHP
- Stars
- 542
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reactphp/dns
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
bug new feature
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
maintenance
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
help wanted new feature
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
help wanted new feature
Difficulty 5/5 Over a week Newbie friendliness 32/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
a11y admissions.uiowa.edu needs grooming SiteImprove best practice
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Save States Menu Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pluginsGLPI/datainjection#673 ·