Skip to content

Commit 252e5d6

Browse files
flichtenheldcron2
authored andcommitted
test_crypto: fix test_occ_mtu_calculation with --disable-fragment
Doesn't make sense to test with fragment, if the code ignores it. Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Arne Schwabe <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg24550.html Signed-off-by: Gert Doering <[email protected]>
1 parent 66f6a3b commit 252e5d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit_tests/openvpn/test_crypto.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,15 @@ test_occ_mtu_calculation(void **state)
299299
linkmtu = calc_options_string_link_mtu(&o, &f);
300300
assert_int_equal(linkmtu, 1445);
301301

302+
#if defined(ENABLE_FRAGMENT)
302303
/* secret, comp-lzo yes, cipher BF-CBC, auth SHA1, fragment 1200 */
303304
o.ce.fragment = 1200;
304305
linkmtu = calc_options_string_link_mtu(&o, &f);
305306
assert_int_equal(linkmtu, 1449);
307+
o.ce.fragment = 0;
308+
#endif
306309

307310
o.comp.alg = COMP_ALG_UNDEF;
308-
o.ce.fragment = 0;
309311
#endif
310312

311313
/* TLS mode */
@@ -350,7 +352,7 @@ test_occ_mtu_calculation(void **state)
350352
assert_int_equal(linkmtu, 1449);
351353

352354

353-
#if defined(USE_COMP)
355+
#if defined(USE_COMP) && defined(ENABLE_FRAGMENT)
354356
o.comp.alg = COMP_ALG_LZO;
355357

356358
/* tls client, auth SHA1, cipher AES-256-GCM, fragment, comp-lzo yes */

0 commit comments

Comments
 (0)