Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new HTTPS and SVCB record types #1402

Merged
merged 5 commits into from Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion copyright.txt
@@ -1,4 +1,4 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com>
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
Expand Down
6 changes: 6 additions & 0 deletions crates/client/src/error/parse_error.rs
Expand Up @@ -196,6 +196,12 @@ impl From<ProtoError> for Error {
}
}

impl From<std::convert::Infallible> for Error {
fn from(_e: std::convert::Infallible) -> Error {
panic!("infallible")
}
}

impl From<Error> for io::Error {
fn from(e: Error) -> Self {
match *e.kind() {
Expand Down
2 changes: 2 additions & 0 deletions crates/client/src/serialize/txt/parse_rdata.rs
Expand Up @@ -46,6 +46,7 @@ impl RDataParser for RData {
RecordType::CAA => caa::parse(tokens).map(RData::CAA)?,
RecordType::CNAME => RData::CNAME(name::parse(tokens, origin)?),
RecordType::HINFO => RData::HINFO(hinfo::parse(tokens)?),
RecordType::HTTPS => svcb::parse(tokens).map(RData::SVCB)?,
RecordType::IXFR => panic!("parsing IXFR doesn't make sense"), // valid panic, never should happen
RecordType::MX => RData::MX(mx::parse(tokens, origin)?),
RecordType::NAPTR => RData::NAPTR(naptr::parse(tokens, origin)?),
Expand All @@ -57,6 +58,7 @@ impl RDataParser for RData {
RecordType::SOA => RData::SOA(soa::parse(tokens, origin)?),
RecordType::SRV => RData::SRV(srv::parse(tokens, origin)?),
RecordType::SSHFP => RData::SSHFP(sshfp::parse(tokens)?),
RecordType::SVCB => svcb::parse(tokens).map(RData::SVCB)?,
RecordType::TLSA => RData::TLSA(tlsa::parse(tokens)?),
RecordType::TXT => RData::TXT(txt::parse(tokens)?),
RecordType::DNSSEC(DNSSECRecordType::SIG) => panic!("parsing SIG doesn't make sense"), // valid panic, never should happen
Expand Down
1 change: 1 addition & 0 deletions crates/client/src/serialize/txt/rdata_parsers/mod.rs
Expand Up @@ -31,5 +31,6 @@ pub(crate) mod openpgpkey;
pub(crate) mod soa;
pub(crate) mod srv;
pub(crate) mod sshfp;
pub(crate) mod svcb;
pub(crate) mod tlsa;
pub(crate) mod txt;