Commit Graph

752 Commits (e2e2a6be79e1952dc9a038e5a65d87d53a1cfc57)

Author SHA1 Message Date
bdbai 96dedcc4c6 Expose underlying device from PcapWriter 2021-08-24 16:07:19 +08:00
Thibaut Vandervelden 8ce629257a Remove trailing commas in macros
This is going to become a hard error in future releases of the compiler.
2021-08-19 12:07:56 +02:00
Thibaut Vandervelden 8adbd1b875 cargo fmt 2021-08-18 16:05:50 +02:00
Thibaut Vandervelden 6a27136047 Fix clippy lints 2021-08-18 16:05:50 +02:00
Dario Nieuwenhuis a94f1b231c Bump MSRV to 1.46 2021-08-18 15:19:38 +02:00
qiujiangkun a43fb222e9 pcap timestamp bugfix 2021-07-01 22:27:10 +08:00
Anton Romanov 7a83e7d69b dhcpv4: Emit DNS servers in repr 2021-06-28 20:03:39 +02:00
qiujiangkun 2a574fbca6 various clippy fix 2021-06-27 10:45:57 +02:00
Dario Nieuwenhuis 98fe17890a rustfmt 2021-06-27 09:31:59 +02:00
Dario Nieuwenhuis 9101e039d5 tcp: do not scale window in SYN packets. 2021-06-17 06:22:30 +02:00
Dario Nieuwenhuis 4045dee3f9 tcp: don't do window scaling when connecting if remote doesn't support it. 2021-06-17 06:02:36 +02:00
Dario Nieuwenhuis 736a17cae3 tcp: fix window scaling of synack being ignored. 2021-06-17 05:56:01 +02:00
Dario Nieuwenhuis 60a299bcc2 tcp: add Nagle's Algorithm. 2021-06-17 04:44:13 +02:00
Dario Nieuwenhuis 9965f09e02 Check that at least one medium is enabled if socket is enabled. 2021-06-17 03:22:02 +02:00
Dario Nieuwenhuis 32311b23dc Add Context struct. 2021-06-17 03:20:58 +02:00
Gerd Zellweger e4d487d5fb Fix unused extern crate warning with certain build flags. 2021-06-14 15:16:15 -07:00
Gerd Zellweger bae279c3a8 Also import alloc crate for std. 2021-06-14 13:39:33 -07:00
Gerd Zellweger 4210fe5e60 Update loopback.rs 2021-06-14 13:33:16 -07:00
Ryan Summers 9f7bf5dc68 Adding support for retrieving socket handle from DHCP sockets 2021-06-14 10:53:27 +02:00
Dario Nieuwenhuis 0754a7703c tcp: use nonzero initial sequence number. 2021-06-11 22:36:26 +02:00
Dario Nieuwenhuis caad8929d5 tcp: fix substract with overflow when receiving a SYNACK with unincremented ACK number. 2021-06-11 22:17:59 +02:00
Dario Nieuwenhuis f1b0a04599 tcp: extract ack_min, ack_max vars 2021-06-11 22:17:24 +02:00
Dario Nieuwenhuis de950ef823 Fix "subtract sequence numbers with underflow" on remote window shrink.
Fixes #489
2021-06-11 11:25:30 +02:00
Ryan Summers 06a52a7de9 Merge branch 'master' into rs/issue-475/udp-rebinding 2021-06-09 16:27:04 +02:00
Ryan Summers a6dbd18574 Merge branch 'master' into rs/issue-281/ethernet-dos 2021-06-09 11:38:40 +02:00
Ryan Summers 57604a4d4c Sanitizing log macro to allow usage in match arm directly 2021-06-09 11:36:28 +02:00
Ryan Summers 421870ee75 Restructuring to allow-unused 2021-06-09 11:30:02 +02:00
Ryan Summers 2fb5880628 Fixing feature flag 2021-06-09 11:13:56 +02:00
qiujiangkun 0be1a76bc3 add std::error::Error to smoltcp::Error 2021-06-08 14:34:38 +08:00
Ryan Summers 84866f8f69 Updating packet buffer clear to be UDP-only 2021-05-31 18:07:19 +02:00
Ryan Summers fa77ddd836 Updating UDP close to clear RX/TX buffers 2021-05-31 18:04:02 +02:00
Ryan Summers e27e3254f4 Fixing clippy 2021-05-31 17:58:20 +02:00
Ryan Summers 0bb9fc90f0 Simplifying loop logic 2021-05-31 17:42:01 +02:00
Ryan Summers 44add57e8e Removing unneeded changes 2021-05-31 17:39:30 +02:00
Ryan Summers f790f59088 Reverting phy changes 2021-05-31 17:36:26 +02:00
Ryan Summers 8474a1b1e4 cleaning up implementation 2021-05-31 17:33:52 +02:00
Ryan Summers 95829934db Fail-free ingress 2021-05-31 17:30:45 +02:00
Ryan Summers 8d4e255090 Adding prototype fix for fail-free ingress 2021-05-31 17:25:04 +02:00
Ryan Summers 108543a2f6 Adding UDP socket close funcionality 2021-05-31 14:25:52 +02:00
Dario Nieuwenhuis b9477f25bc wire/dhcp: Simplify how options are emitted. 2021-05-29 01:44:27 +02:00
Dario Nieuwenhuis ea8d2ae7f4 Fix u32::MAX 2021-05-29 01:32:17 +02:00
Anton Romanov 7b6b70d058 Account for lease time, router and subnet options in DhcpRepr::buffer_len 2021-05-29 01:32:17 +02:00
Dario Nieuwenhuis a5b9461275 tcp: LastAck should only change to Closed on ack of fin.
Fixes #470
2021-05-28 21:09:36 +02:00
Dario Nieuwenhuis 383d2426cb tcp rtte: fix "attempt to multiply with overflow". Fixes #468 2021-05-28 21:02:31 +02:00
Dario Nieuwenhuis a81f2fef56 dhcp: convert port check to hard assert. 2021-05-28 18:43:52 +02:00
Dario Nieuwenhuis 07c3a402a3 Remove unused macro_use 2021-05-28 18:26:08 +02:00
Dario Nieuwenhuis 743f9de039 dhcp: address review comments. 2021-05-28 18:23:50 +02:00
Dario Nieuwenhuis 284f5bc834 wire/udp: clearer HEADER_LEN usage 2021-05-28 17:47:02 +02:00
Dario Nieuwenhuis a916888ab8 dhcp: add max_lease_duration option 2021-04-13 20:23:28 +02:00
Dario Nieuwenhuis 53b62cfbad dhcp: remove 0.0.0.0s from the DNS serevr list.
tp-link routers pad the DNS server list with 0.0.0.0 to a fixed size :(
2021-04-13 18:43:23 +02:00