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
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 72b400e661 - Show all commits
+3 -3
View File
@@ -35,9 +35,9 @@
- An `alert_notification` or an `outbind` from the peer is logged and left unanswered, as SMPP 3.4 - 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 gives neither a response. Each one used to emit `sessionError`, `"alert_notification" has no
response command`. response command`.
- `maxOctets` charges each held segment 1000 octets beyond its own, and each TLV on it, every repeat - `maxOctets` charges each held segment 1000 octets beyond its own, 300 more per TLV on it, and 300
included, 300 more. Segments of empty fields or thousands of empty TLVs used to count as next to per occurrence of a repeatable one. Segments of empty fields or thousands of empty TLVs used to
nothing, so a peer could hold far more than the cap. **Raise a `maxOctets` you tuned low**: it now count as next to nothing, so a peer could hold far more than the cap. **Raise a `maxOctets` you tuned low**: it now
holds a sixth to a tenth as many segments, and an incomplete message evicted over the cap is lost, holds a sixth to a tenth as many segments, and an incomplete message evicted over the cap is lost,
since its segments were already answered. since its segments were already answered.
- `server()` refuses a `maxOctets` below 1 or not a whole number, `Infinity` included, like its - `server()` refuses a `maxOctets` below 1 or not a whole number, `Infinity` included, like its
+1 -1
View File
@@ -261,7 +261,7 @@ All optional. Timeouts are milliseconds.
| `tls` | `false` | A `tls.TlsOptions` object with your certificate and key. A bare `true` is refused. | | `tls` | `false` | A `tls.TlsOptions` object with your certificate and key. A bare `true` is refused. |
| `idleTimeout` | `40000` | Drop a peer that has been silent this long. | | `idleTimeout` | `40000` | Drop a peer that has been silent this long. |
| `maxReassembly` | `1000` | Incomplete multipart messages held per session. | | `maxReassembly` | `1000` | Incomplete multipart messages held per session. |
| `maxOctets` | `67108864` | Roughly the memory incomplete multipart messages may hold per session: each held segment counts its octets plus 1000, and each TLV on it, every repeat included, 300 more. | | `maxOctets` | `67108864` | Roughly the memory incomplete multipart messages may hold per session: each held segment counts its octets plus 1000, 300 more per TLV on it, and 300 per occurrence of a repeatable one. |
| `reassemblyTimeout` | `300000` | How long a late segment can still join an incomplete message. | | `reassemblyTimeout` | `300000` | How long a late segment can still join an incomplete message. |
| `responseTimeout`, `shutdownTimeout`, `maxOutstanding`, `log`, `signal` | as for the client | | | `responseTimeout`, `shutdownTimeout`, `maxOutstanding`, `log`, `signal` | as for the client | |