Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0fedb1db9aa2
Choose a base ref
...
head repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e74ad03b8abb
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 1, 2019

  1. Revert to prevous ordering of TCP options.

    Although ordering is not specified in the spec, some implementations expect
    some ordering (unforntunately I have found one that does, and blocks outbound
    packets due to 'invalid tcp options').
    MabezDev authored and whitequark committed Nov 1, 2019
    Copy the full SHA
    e74ad03 View commit details
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/wire/tcp.rs
6 changes: 3 additions & 3 deletions src/wire/tcp.rs
Original file line number Diff line number Diff line change
@@ -893,12 +893,12 @@ impl<'a> Repr<'a> {
packet.set_ack(self.ack_number.is_some());
{
let mut options = packet.options_mut();
if let Some(value) = self.window_scale {
let tmp = options; options = TcpOption::WindowScale(value).emit(tmp);
}
if let Some(value) = self.max_seg_size {
let tmp = options; options = TcpOption::MaxSegmentSize(value).emit(tmp);
}
if let Some(value) = self.window_scale {
let tmp = options; options = TcpOption::WindowScale(value).emit(tmp);
}
if self.sack_permitted {
let tmp = options; options = TcpOption::SackPermitted.emit(tmp);
} else if self.ack_number.is_some() && self.sack_ranges.iter().any(|s| s.is_some()) {