Skip to content

Commit

Permalink
Add new HTTPS and SVCB record types
Browse files Browse the repository at this point in the history
  • Loading branch information
bluejekyll committed Mar 7, 2021
1 parent a6eb537 commit 3f8eb48
Show file tree
Hide file tree
Showing 6 changed files with 553 additions and 34 deletions.
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/serialize/txt/parse_rdata.rs
Expand Up @@ -46,6 +46,9 @@ 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)?),
// FIXME: actually implement this
#[allow(clippy::unimplemented)]
RecordType::HTTPS => unimplemented!("HTTPS records not yet supported in zone files"),
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 +60,9 @@ 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)?),
// FIXME: actually implement this
#[allow(clippy::unimplemented)]
RecordType::SVCB => unimplemented!("SVCB records not yet supported in zone files"),
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
2 changes: 2 additions & 0 deletions crates/proto/src/rr/rdata/mod.rs
Expand Up @@ -32,6 +32,7 @@ pub mod opt;
pub mod soa;
pub mod srv;
pub mod sshfp;
pub mod svcb;
pub mod tlsa;
pub mod txt;

Expand All @@ -45,5 +46,6 @@ pub use self::opt::OPT;
pub use self::soa::SOA;
pub use self::srv::SRV;
pub use self::sshfp::SSHFP;
pub use self::svcb::SVCB;
pub use self::tlsa::TLSA;
pub use self::txt::TXT;

0 comments on commit 3f8eb48

Please sign in to comment.