mirror of
https://github.com/EmilHernvall/dnsguide.git
synced 2024-12-22 15:24:15 +07:00
examples: fix incorrect hexadecimal representation
* Update examples/sample2.rs * Update examples/sample3.rs * Update examples/sample4.rs * Update examples/sample5.rs
This commit is contained in:
parent
855a381d2d
commit
75819200dc
@ -166,7 +166,7 @@ impl BytePacketBuffer {
|
|||||||
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
||||||
for label in qname.split('.') {
|
for label in qname.split('.') {
|
||||||
let len = label.len();
|
let len = label.len();
|
||||||
if len > 0x34 {
|
if len > 0x3f {
|
||||||
return Err("Single label exceeds 63 characters of length".into());
|
return Err("Single label exceeds 63 characters of length".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ impl BytePacketBuffer {
|
|||||||
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
||||||
for label in qname.split('.') {
|
for label in qname.split('.') {
|
||||||
let len = label.len();
|
let len = label.len();
|
||||||
if len > 0x34 {
|
if len > 0x3f {
|
||||||
return Err("Single label exceeds 63 characters of length".into());
|
return Err("Single label exceeds 63 characters of length".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ impl BytePacketBuffer {
|
|||||||
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
||||||
for label in qname.split('.') {
|
for label in qname.split('.') {
|
||||||
let len = label.len();
|
let len = label.len();
|
||||||
if len > 0x34 {
|
if len > 0x3f {
|
||||||
return Err("Single label exceeds 63 characters of length".into());
|
return Err("Single label exceeds 63 characters of length".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ impl BytePacketBuffer {
|
|||||||
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
fn write_qname(&mut self, qname: &str) -> Result<()> {
|
||||||
for label in qname.split('.') {
|
for label in qname.split('.') {
|
||||||
let len = label.len();
|
let len = label.len();
|
||||||
if len > 0x34 {
|
if len > 0x3f {
|
||||||
return Err("Single label exceeds 63 characters of length".into());
|
return Err("Single label exceeds 63 characters of length".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user