You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For our use case, we're forwarding some requests to an unbound server running on our hosts.
The StubResolver doesn't quite work for us because:
There's no way to send it a Message as the query, only a impl Question, therefore the response's id won't match our request's id.
We can't directly modify the returned Message (from Answer::into_message) because the underlying Octets are Bytes which aren't mutable.
We presently work around this by writing the answer's bytes to a BytesMut, then using that as a Message's backing Octets and then modifying the header to set the original request's id.
Would it be desirable to add a function to make a DNS request via a full Message instead of just impl Question?
If not, then maybe a query_mut function to receive an Answer that can be converted to a Message<BytesMut>.
The text was updated successfully, but these errors were encountered:
The original intention for the stub resolver was to be a driver for the more complex logic implemented by the lookups. Allowing you to do your own raw query was a bit of a side effect. Since that seems to be one of the main uses now, it might be time to reconsider.
We have a plan to separate out the transport implementations into their own modules. This might be a good time to rethink the whole concept.
For our use case, we're forwarding some requests to an
unbound
server running on our hosts.The
StubResolver
doesn't quite work for us because:Message
as the query, only aimpl Question
, therefore the response'sid
won't match our request'sid
.Message
(fromAnswer::into_message
) because the underlyingOctets
areBytes
which aren't mutable.We presently work around this by writing the answer's bytes to a
BytesMut
, then using that as aMessage
's backingOctets
and then modifying the header to set the original request'sid
.Would it be desirable to add a function to make a DNS request via a full
Message
instead of justimpl Question
?If not, then maybe a
query_mut
function to receive anAnswer
that can be converted to aMessage<BytesMut>
.The text was updated successfully, but these errors were encountered: