Skip to content

Commit

Permalink
add DNAME type code in from_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Litr0 committed Oct 31, 2023
1 parent 486b4ad commit c242a2e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/message/rdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,20 @@ impl FromBytes<Result<Rdata, &'static str>> for Rdata {

Ok(Rdata::SomeTxtRdata(rdata))
}
////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
39 => {
let rdata = CnameRdata::from_bytes(&bytes[..bytes.len() - 4], full_msg);

match rdata {
Ok(_) => {}
Err(e) => {
return Err(e);
}
}

Ok(Rdata::SomeCnameRdata(rdata.unwrap()))
}

//////////////// Replace the next line when type OPT is implemented ////////////
41 => {
println!("OPT");
Expand Down

0 comments on commit c242a2e

Please sign in to comment.