Skip to content

Commit

Permalink
fix: Avoid spurious PMTUD resets (#2293)
Browse files Browse the repository at this point in the history
* fix: Avoid suprious PMTUD resets

Previously, after PMTUD had completed, we could
end up restarting PMTUD when packet loss counters
for packets larger than the current PMTU exceeded
the limit. We're now making sure to not do that.

* WIP

* Nits

* Update path.rs

Co-authored-by: Martin Thomson <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Fix condition

* Update neqo-transport/src/path.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Fixes and test refactoring

* Update neqo-transport/src/pmtud.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Fixes

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Martin Thomson <[email protected]>
Co-authored-by: Max Inden <[email protected]>
  • Loading branch information
3 people authored Feb 12, 2025
1 parent 714e099 commit 8e82a9e
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 137 deletions.
2 changes: 1 addition & 1 deletion neqo-transport/src/packet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl PacketBuilder {
pmtud: &Pmtud,
) -> bool {
if pmtud.needs_probe() {
debug_assert!(pmtud.probe_size() > profile.limit());
debug_assert!(pmtud.probe_size() >= profile.limit());
self.limit = pmtud.probe_size() - aead_expansion;
true
} else {
Expand Down
10 changes: 8 additions & 2 deletions neqo-transport/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,18 @@ impl Path {
) -> Self {
let iface_mtu = match mtu::interface_and_mtu(remote.ip()) {
Ok((name, mtu)) => {
qdebug!("Outbound interface {name} has MTU {mtu}");
qdebug!(
"Outbound interface {name} for destination {ip} has MTU {mtu}",
ip = remote.ip()
);
stats.pmtud_iface_mtu = mtu;
Some(mtu)
}
Err(e) => {
qwarn!("Failed to determine outbound interface: {e}");
qwarn!(
"Failed to determine outbound interface for destination {ip}: {e}",
ip = remote.ip()
);
None
}
};
Expand Down
Loading

0 comments on commit 8e82a9e

Please sign in to comment.