[GH-ISSUE #74] Don't fail on unsupported dns records #25

Closed
opened 2026-03-04 23:23:50 +03:00 by kerem · 3 comments
Owner

Originally created by @nkakouros on GitHub (Oct 25, 2018).
Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/74

I took a quick a look in the code after #73. Comparing dns_answer_names and dns query type, it seems to me that if a query of a type missing from dns_answer_names (like the SRV record that caused #73) is received, php-dns will crash on the same point as in #73.

I think that php-dns should not fail in any case. If my understanding above is correct, how could php-dns handle that situation more gracefully?

Originally created by @nkakouros on GitHub (Oct 25, 2018). Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/74 I took a quick a look in the code after #73. Comparing [dns_answer_names](https://github.com/yswery/PHP-DNS-SERVER/blob/master/src/RecursiveResolver.php#L12) and [dns query type](https://github.com/yswery/PHP-DNS-SERVER/blob/master/src/RecordTypeEnum.php#L11), it seems to me that if a query of a type missing from `dns_answer_names` (like the `SRV` record that caused #73) is received, php-dns will crash on the same point as in #73. I think that php-dns should not fail in any case. If my understanding above is correct, how could php-dns handle that situation more gracefully?
kerem closed this issue 2026-03-04 23:23:50 +03:00
Author
Owner

@samuelwilliams commented on GitHub (Oct 25, 2018):

Check out branch version-1 - this has a much more graceful way of dealing with unsupported record types.

<!-- gh-comment-id:433179284 --> @samuelwilliams commented on GitHub (Oct 25, 2018): Check out branch `version-1` - this has a much more graceful way of dealing with unsupported record types.
Author
Owner

@nkakouros commented on GitHub (Oct 25, 2018):

This seems like a total reworking of the project structure. Does this mean that #73 is useless? Should I close it?

<!-- gh-comment-id:433212695 --> @nkakouros commented on GitHub (Oct 25, 2018): This seems like a total reworking of the project structure. Does this mean that #73 is useless? Should I close it?
Author
Owner

@samuelwilliams commented on GitHub (Oct 25, 2018):

Dont close it, it's still an improvement. But I haven't worked in SRV RData
into version-1 yet.

On Fri., 26 Oct. 2018, 07:30 tterranigma, notifications@github.com wrote:

This seems like a total reworking of the project structure. Does this mean
that #73 https://github.com/yswery/PHP-DNS-SERVER/pull/73 is useless?
Should I close it?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/yswery/PHP-DNS-SERVER/issues/74#issuecomment-433212695,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAxOHnCo3Nieb6dA5DCBqzAw5rgIZC6Oks5uoi18gaJpZM4X6HWI
.

<!-- gh-comment-id:433233065 --> @samuelwilliams commented on GitHub (Oct 25, 2018): Dont close it, it's still an improvement. But I haven't worked in SRV RData into version-1 yet. On Fri., 26 Oct. 2018, 07:30 tterranigma, <notifications@github.com> wrote: > This seems like a total reworking of the project structure. Does this mean > that #73 <https://github.com/yswery/PHP-DNS-SERVER/pull/73> is useless? > Should I close it? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/yswery/PHP-DNS-SERVER/issues/74#issuecomment-433212695>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAxOHnCo3Nieb6dA5DCBqzAw5rgIZC6Oks5uoi18gaJpZM4X6HWI> > . >
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PHP-DNS-SERVER#25
No description provided.