Lookup both A and AAAA records for node FQDNs (#4398)
Allows IPv6 addresses to be used, instead of IPv4 being required. Closes <https://github.com/pterodactyl/panel/issues/4011>
This commit is contained in:
parent
815e1e4c4d
commit
7b91c38396
3 changed files with 17 additions and 3 deletions
|
@ -60,6 +60,10 @@ class AssignmentService
|
|||
}
|
||||
|
||||
try {
|
||||
// TODO: how should we approach supporting IPv6 with this?
|
||||
// gethostbyname only supports IPv4, but the alternative (dns_get_record) returns
|
||||
// an array of records, which is not ideal for this use case, we need a SINGLE
|
||||
// IP to use, not multiple.
|
||||
$underlying = gethostbyname($data['allocation_ip']);
|
||||
$parsed = Network::parse($underlying);
|
||||
} catch (Exception $exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue