Set segment_size based on the amount of sent datagrams

The option only needs to be sent for GSO (multiple datagrams
in a buffer).
This commit is contained in:
Matthias Einwag
2021-02-17 18:22:58 +00:00
committed by Dirkjan Ochtman
parent 97c0bb0869
commit 5cff9ab5f7
+4 -1
View File
@@ -556,7 +556,10 @@ where
} else {
None
},
segment_size: None,
segment_size: match num_datagrams {
1 => None,
_ => Some(self.path.mtu as usize),
},
src_ip: self.local_ip,
})
}