From 38e0a2ec1b05ef23fe34f9b4ea8ccc16536266ce Mon Sep 17 00:00:00 2001 From: Craig Morten Date: Sun, 15 May 2022 15:43:08 +0100 Subject: feat(ext/net): support full `SOA` record interface (#14617) --- ext/net/ops.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'ext/net/ops.rs') diff --git a/ext/net/ops.rs b/ext/net/ops.rs index 2478d0984..83df7b626 100644 --- a/ext/net/ops.rs +++ b/ext/net/ops.rs @@ -584,6 +584,11 @@ pub enum DnsReturnRecord { Soa { mname: String, rname: String, + serial: u32, + refresh: i32, + retry: i32, + expire: i32, + minimum: u32, }, Srv { priority: u16, @@ -743,6 +748,11 @@ fn rdata_to_return_record( SOA => r.as_soa().map(|soa| DnsReturnRecord::Soa { mname: soa.mname().to_string(), rname: soa.rname().to_string(), + serial: soa.serial(), + refresh: soa.refresh(), + retry: soa.retry(), + expire: soa.expire(), + minimum: soa.minimum(), }), SRV => r.as_srv().map(|srv| DnsReturnRecord::Srv { priority: srv.priority(), @@ -858,7 +868,12 @@ mod tests { func(&rdata), Some(DnsReturnRecord::Soa { mname: "".to_string(), - rname: "".to_string() + rname: "".to_string(), + serial: 0, + refresh: i32::MAX, + retry: i32::MAX, + expire: i32::MAX, + minimum: 0, }) ); } -- cgit v1.2.3