osmo-ttcn3-hacks/sccp
Harald Welte 67881aef23 Avoid generating zero-length packets
I used the construct like f_rnd_octstring(f_rnd_int(100)) in a number
of places to generate random-length packets with randomized length.

The problem I didn't realize is that f_rnd_int() of course can also
return '0', which would generate zero-length packets.  This may be
permitted in some protocols, but it leads to problems e.g. when trying
to send a UDP packet of zero length (which the kernel will not do).

So let's introduce
* f_rnd_int_nonzero() for returning non-zero randomized integers
* f_rnd_octstring_rnd_len() for returning a random-length random payload
  octet string
* replace all f_rnd_octstring(f_rnd_int()) call sites with the new
  function.

Change-Id: I818a113ff8d2a2f7cab2ec7d9c8661607c6331d6
Closes: OS#5528
2022-04-12 22:52:47 +02:00
..
SCCP_CodecPort.ttcn Add SCCP_Tests_RAW for testing the actual SCCP implementation 2020-01-17 17:34:23 +01:00
SCCP_Tests.cfg Add SCCP_Tests_RAW for testing the actual SCCP implementation 2020-01-17 17:34:23 +01:00
SCCP_Tests.default sccp: Rename module param sccp_cfg to mp_sccp_cfg 2020-01-17 17:34:23 +01:00
SCCP_Tests.ttcn sccp: Rename module param sccp_cfg to mp_sccp_cfg 2020-01-17 17:34:23 +01:00
SCCP_Tests_RAW.ttcn Avoid generating zero-length packets 2022-04-12 22:52:47 +02:00
gen_links.sh Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
regen_makefile.sh regen_makefile.sh: set executable name explicitly 2021-10-13 11:12:22 +02:00