Skip to content

Commit

Permalink
Modernize samples
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHernvall committed Jun 17, 2020
1 parent 2d3db41 commit 3136969
Show file tree
Hide file tree
Showing 9 changed files with 1,157 additions and 997 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*.swp
target
tango.stamp


#Added by cargo

/target
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "dnsguide"
version = "0.1.0"
authors = ["Emil Hernvall <[email protected]>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,18 @@ DNS server, starting from first principles.
* [Chapter 3 - Adding more Record Types](/chapter3.md)
* [Chapter 4 - Baby's first DNS server](/chapter4.md)
* [Chapter 5 - Recursive Resolve](/chapter5.md)

Samples
-------

Each chapter has a corresponding sample which contains the full code up to
that point in the guide, named `sample1.rs` through `sample5.rs`. These can be
run using, for first chapter, `cargo run --example sample1`.

Revision History
----------------

* June 2020 - Fixed a security vulnerability in `read_qname` which allowed for
a malicious packet to trigger an infinite loop. Modernized the code to
conform to current rust pratices.
* July 2016 - Initial version
Loading

0 comments on commit 3136969

Please sign in to comment.