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').
This commit is contained in:
parent
287e4f2814
commit
cd48a2ef12
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue