Charge each held segment and its TLVs for their objects against the reassembly cap #27

Merged
lilleman merged 6 commits from tlv-object-charge into main 2026-09-25 19:19:16 +02:00
Showing only changes of commit fd6ce16325 - Show all commits
+4 -3
View File
@@ -35,9 +35,10 @@
- An `alert_notification` or an `outbind` from the peer is logged and left unanswered, as SMPP 3.4
gives neither a response. Each one used to emit `sessionError`, `"alert_notification" has no
response command`.
- `maxOctets` charges each held segment, and every TLV it carries, for the memory it keeps beyond
its octets. A peer could hold around 67 times the cap with segments of empty fields, and megabytes
per segment with thousands of empty TLVs, both of which the cap counted as next to nothing.
- `maxOctets` charges each held segment about 1 KB, and every TLV it carries 300 octets, for the
memory they keep beyond their octets. Segments of empty fields or thousands of empty TLVs used to
count as next to nothing, so a peer could hold far more than the cap. A `maxOctets` tuned low now
holds fewer segments.
- `server()` refuses a `maxOctets` below 1 or not a whole number, `Infinity` included, like its
other limits. `server({ maxOctets: 0 })` used to start and then refuse every multipart message.
- `callback_num`, `callback_num_atag`, `callback_num_pres_ind`, `broadcast_area_identifier` and