cleanup before 0.9.0 release
This commit is contained in:
parent
1f8ede233b
commit
fbdc8dd94b
@ -8,11 +8,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- UdpStream & TcpSteam to support stream of messages with src address
|
||||
- TimeoutStream to wrap TcpStreams to help guard against malicious clients
|
||||
- Added Notify support to ClientFuture
|
||||
- Added IntoRecordSet and conversion impls for RecordSet and Record
|
||||
|
||||
### Changed
|
||||
- Split Server and Client into separate crates, #43
|
||||
- Moved many integration tests to `tests` from `src`, #52
|
||||
- Migrated all handles to new futures::sync::mpsc impls
|
||||
- Modified all requisite client methods for IntoRecordSet.
|
||||
- All client methods now support multiple records per query, update, notify and delete
|
||||
|
||||
### Fixed
|
||||
- Flush TcpStream after fully sending Message
|
||||
|
14
Cargo.lock
generated
14
Cargo.lock
generated
@ -47,7 +47,7 @@ name = "backtrace-sys"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -123,7 +123,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gcc"
|
||||
version = "0.3.39"
|
||||
version = "0.3.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -210,7 +210,7 @@ dependencies = [
|
||||
"bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -227,7 +227,7 @@ dependencies = [
|
||||
"lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -236,7 +236,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "miow"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -554,7 +554,7 @@ dependencies = [
|
||||
"checksum docopt 0.6.86 (registry+https://github.com/rust-lang/crates.io-index)" = "4a7ef30445607f6fc8720f0a0a2c7442284b629cf0d049286860fae23e71c4d9"
|
||||
"checksum error-chain 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faa976b4fd2e4c2b2f3f486874b19e61944d3de3de8b61c9fcf835d583871bcc"
|
||||
"checksum futures 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bad0a2ac64b227fdc10c254051ae5af542cf19c9328704fd4092f7914196897"
|
||||
"checksum gcc 0.3.39 (registry+https://github.com/rust-lang/crates.io-index)" = "771e4a97ff6f237cf0f7d5f5102f6e28bb9743814b6198d684da5c58b76c11e0"
|
||||
"checksum gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "872db9e59486ef2b14f8e8c10e9ef02de2bccef6363d7f34835dedb386b3d950"
|
||||
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6abe0ee2e758cd6bc8a2cd56726359007748fbf4128da998b65d0b70f881e19b"
|
||||
@ -568,7 +568,7 @@ dependencies = [
|
||||
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
|
||||
"checksum mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a637d1ca14eacae06296a008fa7ad955347e34efcb5891cfd8ba05491a37907e"
|
||||
"checksum mio 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "410a1a0ff76f5a226f1e4e3ff1756128e65cd30166e39c3892283e2ac09d5b67"
|
||||
"checksum miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d5bfc6782530ac8ace97af10a540054a37126b63b0702ddaaa243b73b5745b9a"
|
||||
"checksum miow 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b54090eaa23880441a80c4adec5fd6b4af1152a49c5e78f96a82469abc6942"
|
||||
"checksum net2 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "5edf9cb6be97212423aed9413dd4729d62b370b5e1c571750e882cebbbc1e3e2"
|
||||
"checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79"
|
||||
"checksum nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0d95c5fa8b641c10ad0b8887454ebaafa3c92b5cd5350f8fc693adafd178e7b"
|
||||
|
@ -57,6 +57,7 @@ impl<'a> fmt::Debug for TestClientConnection<'a> {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(deprecated)]
|
||||
fn test_query_nonet() {
|
||||
let authority = create_example();
|
||||
let mut catalog = Catalog::new();
|
||||
@ -69,6 +70,7 @@ fn test_query_nonet() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_query_udp() {
|
||||
let addr: SocketAddr = ("8.8.8.8",53).to_socket_addrs().unwrap().next().unwrap();
|
||||
let conn = UdpClientConnection::new(addr).unwrap();
|
||||
@ -79,6 +81,7 @@ fn test_query_udp() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_query_tcp() {
|
||||
let addr: SocketAddr = ("8.8.8.8",53).to_socket_addrs().unwrap().next().unwrap();
|
||||
let conn = TcpClientConnection::new(addr).unwrap();
|
||||
@ -113,6 +116,7 @@ fn test_query<C: ClientConnection>(client: Client<C>) {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(deprecated)]
|
||||
fn test_secure_query_example_nonet() {
|
||||
let authority = create_secure_example();
|
||||
|
||||
@ -134,6 +138,7 @@ fn test_secure_query_example_nonet() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_secure_query_example_udp() {
|
||||
let addr: SocketAddr = ("8.8.8.8",53).to_socket_addrs().unwrap().next().unwrap();
|
||||
let conn = UdpClientConnection::new(addr).unwrap();
|
||||
@ -144,6 +149,7 @@ fn test_secure_query_example_udp() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_secure_query_example_tcp() {
|
||||
let addr: SocketAddr = ("8.8.8.8",53).to_socket_addrs().unwrap().next().unwrap();
|
||||
let conn = TcpClientConnection::new(addr).unwrap();
|
||||
@ -178,6 +184,7 @@ fn test_secure_query_example<C: ClientConnection>(client: Client<C>) {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_dnssec_rollernet_td_udp() {
|
||||
let c = Client::new(UdpClientConnection::new("8.8.8.8:53".parse().unwrap()).unwrap());
|
||||
c.secure_query(
|
||||
@ -189,6 +196,7 @@ fn test_dnssec_rollernet_td_udp() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_dnssec_rollernet_td_tcp() {
|
||||
let c = Client::new(TcpClientConnection::new("8.8.8.8:53".parse().unwrap()).unwrap());
|
||||
c.secure_query(
|
||||
@ -200,6 +208,7 @@ fn test_dnssec_rollernet_td_tcp() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_dnssec_rollernet_td_tcp_mixed_case() {
|
||||
let c = Client::new(TcpClientConnection::new("8.8.8.8:53".parse().unwrap()).unwrap());
|
||||
c.secure_query(
|
||||
@ -210,6 +219,7 @@ fn test_dnssec_rollernet_td_tcp_mixed_case() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(deprecated)]
|
||||
fn test_nsec_query_example_nonet() {
|
||||
let authority = create_secure_example();
|
||||
|
||||
@ -231,6 +241,7 @@ fn test_nsec_query_example_nonet() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_nsec_query_example_udp() {
|
||||
let addr: SocketAddr = ("8.8.8.8",53).to_socket_addrs().unwrap().next().unwrap();
|
||||
let conn = UdpClientConnection::new(addr).unwrap();
|
||||
@ -240,6 +251,7 @@ fn test_nsec_query_example_udp() {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_nsec_query_example_tcp() {
|
||||
let addr: SocketAddr = ("8.8.8.8",53).to_socket_addrs().unwrap().next().unwrap();
|
||||
let conn = TcpClientConnection::new(addr).unwrap();
|
||||
@ -261,6 +273,7 @@ fn test_nsec_query_example<C: ClientConnection>(client: Client<C>) {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[allow(deprecated)]
|
||||
fn test_nsec_query_type() {
|
||||
let name = domain::Name::with_labels(vec!["www".to_string(), "example".to_string(), "com".to_string()]);
|
||||
|
||||
|
@ -300,6 +300,7 @@ impl DnsHandler for (UdpSocket, VecDeque<UdpHandler>) {
|
||||
}
|
||||
|
||||
impl DnsHandler for TcpHandler {
|
||||
#[allow(deprecated)]
|
||||
fn handle(&mut self, events: EventSet, catalog: &Arc<Catalog>) -> (Option<EventSet>, Option<(DnsHandlerType, EventSet)>) {
|
||||
if events.is_error() {
|
||||
warn!("closing, error from: {:?}", self.get_stream());
|
||||
|
@ -38,6 +38,8 @@ impl ServerFuture {
|
||||
|
||||
/// Register a UDP socket. Should be bound before calling this function.
|
||||
pub fn register_socket(&self, socket: std::net::UdpSocket) {
|
||||
debug!("registered udp: {:?}", socket);
|
||||
|
||||
// create the new UdpStream
|
||||
let (buf_stream, stream_handle) = UdpStream::with_bound(socket, self.io_loop.handle());
|
||||
let request_stream = RequestStream::new(buf_stream, stream_handle);
|
||||
@ -71,6 +73,7 @@ impl ServerFuture {
|
||||
// TODO: this is an awkward interface with socketaddr...
|
||||
let addr = listener.local_addr().expect("listener is not bound?");
|
||||
let listener = tokio_core::net::TcpListener::from_listener(listener, &addr, &handle).expect("could not register listener");
|
||||
debug!("registered tcp: {:?}", listener);
|
||||
|
||||
// for each incoming request...
|
||||
self.io_loop.handle().spawn(
|
||||
|
@ -57,6 +57,7 @@ fn test_server_www_tcp() {
|
||||
// assert!(server_result.is_ok(), "server failed: {:?}", server_result);
|
||||
}
|
||||
|
||||
#[allow(deprecated)] // TODO: for now...
|
||||
fn client_thread_www<C: ClientConnection>(conn: C) {
|
||||
let name = Name::with_labels(vec!["www".to_string(), "example".to_string(), "com".to_string()]);
|
||||
println!("about to query server: {:?}", conn);
|
||||
|
@ -62,6 +62,7 @@ fn test_server_www_tcp() {
|
||||
// assert!(server_result.is_ok(), "server failed: {:?}", server_result);
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
#[allow(dead_code)]
|
||||
fn client_thread_www<C: ClientConnection>(conn: C) {
|
||||
let name = Name::with_labels(vec!["www".to_string(), "example".to_string(), "com".to_string()]);
|
||||
@ -102,6 +103,7 @@ fn new_catalog() -> Catalog {
|
||||
catalog
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn server_thread_udp(udp_socket: UdpSocket) {
|
||||
let catalog = new_catalog();
|
||||
|
||||
@ -111,6 +113,7 @@ fn server_thread_udp(udp_socket: UdpSocket) {
|
||||
server.listen().unwrap();
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn server_thread_tcp(tcp_listener: TcpListener) {
|
||||
let catalog = new_catalog();
|
||||
let mut server = Server::new(catalog);
|
||||
|
Loading…
Reference in New Issue
Block a user