diff options
Diffstat (limited to 'debian/patches/regress-integrity-robust.patch')
-rw-r--r-- | debian/patches/regress-integrity-robust.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/regress-integrity-robust.patch b/debian/patches/regress-integrity-robust.patch new file mode 100644 index 000000000..2c515e317 --- /dev/null +++ b/debian/patches/regress-integrity-robust.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From c210daa1ae77904f57478315e75af3f82a5d69f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Colin Watson <cjwatson@debian.org> | ||
3 | Date: Sun, 1 Jan 2017 15:21:10 +0000 | ||
4 | Subject: Make integrity tests more robust against timeouts | ||
5 | |||
6 | If the first test in a series for a given MAC happens to modify the low | ||
7 | bytes of a packet length, then ssh will time out and this will be | ||
8 | interpreted as a test failure. Handle this failure mode. | ||
9 | |||
10 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2658 | ||
11 | Patch-Name: regress-integrity-robust.patch | ||
12 | |||
13 | Last-Update: 2017-01-01 | ||
14 | --- | ||
15 | regress/integrity.sh | 6 ++++-- | ||
16 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/regress/integrity.sh b/regress/integrity.sh | ||
19 | index 1df2924f..ed378337 100644 | ||
20 | --- a/regress/integrity.sh | ||
21 | +++ b/regress/integrity.sh | ||
22 | @@ -60,14 +60,16 @@ for m in $macs; do | ||
23 | Corrupted?MAC* | *message?authentication?code?incorrect*) | ||
24 | emac=`expr $emac + 1`; skip=0;; | ||
25 | padding*) epad=`expr $epad + 1`; skip=0;; | ||
26 | + *Timeout,?server*) | ||
27 | + etmo=`expr $etmo + 1`; skip=0;; | ||
28 | *) fail "unexpected error mac $m at $off: $out";; | ||
29 | esac | ||
30 | done | ||
31 | - verbose "test $tid: $ecnt errors: mac $emac padding $epad length $elen" | ||
32 | + verbose "test $tid: $ecnt errors: mac $emac padding $epad length $elen timeout $etmo" | ||
33 | if [ $emac -eq 0 ]; then | ||
34 | fail "$m: no mac errors" | ||
35 | fi | ||
36 | - expect=`expr $ecnt - $epad - $elen` | ||
37 | + expect=`expr $ecnt - $epad - $elen - $etmo` | ||
38 | if [ $emac -ne $expect ]; then | ||
39 | fail "$m: expected $expect mac errors, got $emac" | ||
40 | fi | ||