whitequark
c73298f01e
Improve handling of TCP ACK packets in FIN-* states.
...
Previously, sockets could get stuck in the CLOSING state, after
the sequence described in the new test_mutual_close_with_data_2.
The root cause was that some state machine transitions got
folded into ACK handling.
Now, all transitions are handled in the same match statement,
and ACK handling is broken up around it.
2017-03-07 10:17:30 +00:00
whitequark
393ebbe682
Don't put non-unicast (IP or Ethernet) addresses into ARP cache.
...
Thanks @little-dude for pointing this out--it's probably a DoS bug.
2017-03-07 06:32:18 +00:00
whitequark
b305797cb4
Trace eviction and fill in SliceArpCache.
2017-03-07 06:25:47 +00:00
Corentin Henry
0f2b05ede7
arp: increment lru when inserting a new entry
2017-03-07 06:04:40 +00:00
Corentin Henry
40d3a3ada8
arp: use valid unicast ip addresses for tests
2017-03-07 05:20:28 +00:00
whitequark
06a019becf
Update README to mention lack of multicast support.
2017-03-06 04:01:06 +00:00
whitequark
5137608aed
Follow-up to b9e79d19; always process broadcast frames.
2017-03-06 04:00:13 +00:00
whitequark
d25eebc0ef
Ignore Ethernet frames for which we aren't a destination.
2017-03-06 03:58:19 +00:00
whitequark
c9a2ac7a40
Update README.
2017-03-05 06:18:50 +00:00
whitequark
ad91787c47
Bump version.
2017-03-05 06:16:18 +00:00
whitequark
ae89abe0a4
Update README to explain how the client example works.
2017-03-05 06:15:15 +00:00
whitequark
9ce66375c4
Add the "embedded" crate category.
2017-03-05 05:49:53 +00:00
whitequark
493a319132
Remove the `use_` prefix from feature names.
...
I haven't realized that a feature `log` with an optional crate
dependency `log` activates that dependency, and added the prefix
to avoid a "clash". This is unnecessary.
2017-03-05 05:49:38 +00:00
whitequark
a070429e2c
Travis: don't build tests without the std feature.
...
Neither tests nor examples work without the library being built
with std.
2017-03-05 05:34:24 +00:00
whitequark
0836bc949a
Fix condition for acceptable RST|ACK in TCP SYN-SENT state.
2017-03-05 05:31:12 +00:00
whitequark
cc67e1f753
Don't block forever in TapInterface.
...
Ideally Devices should be non-blocking, but that would be really
annoying to implement, so for now, to get the examples working,
I'm using this hack.
2017-03-05 05:30:03 +00:00
whitequark
0d32fcee5b
Send an ARP request when the destination is not in cache.
2017-03-05 04:59:51 +00:00
whitequark
78d3d53a06
Use trait FromStr for the parsing code.
2017-03-05 04:48:13 +00:00
whitequark
f49723bbf9
Add a TCP client example.
2017-03-05 04:47:45 +00:00
whitequark
d20c98f870
Factor out common code from examples.
2017-03-05 04:19:19 +00:00
whitequark
cd894460f5
Implement the TCP SYN-SENT state.
2017-03-05 03:53:04 +00:00
whitequark
e36e05905c
Fix an incorrect tracing message.
2017-03-05 03:16:15 +00:00
whitequark
9905b3de86
Pull in macros from the log crate in tests.
2017-01-31 11:46:07 +00:00
whitequark
255d69d63b
Fix the TCP MSS calculation.
2017-01-31 11:39:33 +00:00
whitequark
c0074eda11
Add the log crate to dev-dependencies.
2017-01-31 11:32:53 +00:00
whitequark
4ef94b4e61
Travis: run tests, not just build.
2017-01-31 11:13:28 +00:00
whitequark
da4900a02b
Fix an incorrect payload length when sending TCP MSS option.
2017-01-27 03:35:22 +00:00
whitequark
be9699e814
Update TCP implementation status in README.
2017-01-27 03:09:26 +00:00
whitequark
d6b7623c37
Receive the TCP MSS option and act on it.
2017-01-27 03:06:52 +00:00
whitequark
bc1d65ea89
Send the TCP MSS option.
2017-01-27 02:56:27 +00:00
whitequark
077513fda6
Add support for TCP MSS option in TCP representation.
2017-01-27 02:56:27 +00:00
whitequark
4c3f454902
Add support for TCP option parsing and emission.
2017-01-27 00:33:30 +00:00
whitequark
4267ad2635
Fix an inaccurate comment.
2017-01-26 22:04:05 +00:00
whitequark
ca1146995f
Remove TcpControl::len().
2017-01-26 21:20:48 +00:00
whitequark
a3c997f007
Also parse Ethernet addresses separated by dashes (-).
...
This is handy because we print them separated by dashes.
2017-01-26 17:28:07 +00:00
TÖRÖK Attila
4d8b4c09e9
examples/server: fix outdated/misleading variable name.
2017-01-26 16:59:12 +00:00
whitequark
22e5462936
Add Internet and Ethernet address parsing (from strings).
2017-01-25 19:41:02 +00:00
whitequark
87cfcf0b91
README: clarify status of 802.3 support.
2017-01-25 12:29:52 +00:00
whitequark
1bf16b1f52
Bump version.
2017-01-25 06:55:53 +00:00
whitequark
9b8671ce15
Fix the TCP FIN emission with queued data rolling over TX buffer.
2017-01-25 06:20:57 +00:00
whitequark
9fbb5cfff1
Fix the TCP ACK handling in FIN-WAIT-1 state with queued data.
2017-01-25 06:01:58 +00:00
whitequark
68064c3725
Refactor the TCP ACK handling in ESTABLISHED/CLOSE-WAIT states.
2017-01-25 05:50:14 +00:00
whitequark
8b292c6dd8
Don't switch TCP state from FIN-WAIT-1 to FIN-WAIT-2 with queued data.
2017-01-25 05:36:42 +00:00
whitequark
bef01740a7
If a TCP FIN|ACK also ACKs our FIN, transition to TIME-WAIT.
2017-01-25 03:58:03 +00:00
whitequark
f6d542b739
Actually close TCP sockets with 0 references during pruning.
2017-01-25 02:45:17 +00:00
whitequark
5cb4e6f760
Trace pruning of sockets from a set.
2017-01-25 02:23:10 +00:00
whitequark
497aa5919a
Correctly treat TCP ACKs that acknowledge both data and a FIN.
2017-01-23 22:17:04 +00:00
whitequark
368b954a3c
Bump to 0.2.0.
2017-01-23 17:28:17 +00:00
whitequark
9a911ab0e8
Update dev-dependencies.
2017-01-23 17:27:53 +00:00
whitequark
92fde3d18b
Don't send TCP FIN flag yet if next segment will also have data.
2017-01-23 12:07:07 +00:00