tfpauly / draft-pauly-adaptive-dns-privacy

Adaptive DNS Privacy
Other
8 stars 9 forks source link

Check for bad dns request in the protocol #154

Closed tanyav2 closed 3 years ago

tanyav2 commented 3 years ago

Currently, a bad DNS request, note, not a DNS request that returns something like NXDOMAIN, just a straight up bad request like say dns_msg = [1], returns a generic 400. Checking for this is something that can be done client side. Currently, creating a new ObliviousDoHQueryBody just takes in a string of bytes, without bothering to check if this is even a valid DNS message: https://docs.rs/odoh-rs/0.1.5/odoh_rs/protocol/struct.ObliviousDoHQueryBody.html#method.new

What is the consensus on adding a check for this in the protocol?

cc @chris-wood @tfpauly

tfpauly commented 3 years ago

@tanyav2 I don't quite follow the proposal—is this about checking on the client library to ensure that it's not sending garbage? While I think that's good for an implementation, it doesn't seem like an item for the spec.

tanyav2 commented 3 years ago

Yes, adding a check in the protocol library (not client library) to ensure that it isn't receiving garbage. I wasn't sure if such a check should be added in the protocol implementation if it wasn't in the actual protocol spec.

chris-wood commented 3 years ago

Agreed. This seems like an implementation issue, not a protocol issue. Closing as such.