fix!: correct the Service Indicator constants

Merged
GO
15d ago
+78-21

DATA built with five of the params.ServiceInd* constants carried the wrong Service Indicator. The constants were an iota table with too few blank entries for the reserved values, so every constant after ISUP was shifted down: DATA built with ServiceIndBICC went out with SI 11 instead of 13.

RFC 4666 §3.3.1 carries the Service Indicator of the original SS7 message in Protocol Data, and §3.4.5 states that the MTP3-User Identity values "align with those provided in the SS7 MTP3 User Part Unavailable message and Service Indicator". The package's MTP3-User Identity constants already had the right values. The Service Indicator constants now match them and are written out explicitly.

ConstantBeforeAfter
ServiceIndBroadbandISUP79
ServiceIndSatelliteISUP810
ServiceIndAALType2Signalling1012
ServiceIndBICC1113
ServiceIndGatewayControlProtocol1214

ServiceIndUnused, ServiceIndSCCP, ServiceIndTUP and ServiceIndISUP keep their values.

This also removes params.UserIdentityUnknown, the last compatibility alias; use params.UnknownCause, which is still 0. The codec inventory test meant to catch such aliases read the doc comments of functions and methods only. It now reads those of constants, variables and types too.

Breaking changes: the five values above and the removed alias. Code that stored or compared the old numbers needs updating. Users of SCCP, TUP and ISUP are not affected.

Tests

  • TestServiceIndicatorValues pins every Service Indicator constant to RFC 4666 and to its MTP3-User Identity counterpart. It fails on main for the five constants. Reverting any one of the five values on this branch makes it fail again.
  • TestNoDeprecationLoggingSurvivesInTheCodec now fails on main, naming UserIdentityUnknown. On this branch it fails if the alias is restored, and passes with the alias present only if the new doc collection is removed, which is the gap it closes.
  • A packet capture of DATA sent over SCTP, decoded with Wireshark's M3UA dissector, shows the Service Indicator as 11 on main and 13 on this branch for ServiceIndBICC, and as 3 on both for ServiceIndSCCP.

Local validation: the full local suite passed on 978da89223cb (54 steps, including the Linux SCTP race suite in Docker and the cross-compiles); non-zero steps: none.


Summary by cubic

Fixes the Service Indicator constants in params so DATA built with params.ServiceInd* carries the correct SS7 Service Indicator. The iota table had too few reserved entries, shifting five constants down: DATA built with ServiceIndBICC went out with SI 11 instead of 13. The values are now explicit and match RFC 4666 §3.3.1 and §3.4.5, plus the package's MTP3-User Identity constants.

Breaking changes

  • ServiceIndBroadbandISUP (9), ServiceIndSatelliteISUP (10), ServiceIndAALType2Signalling (12), ServiceIndBICC (13), and ServiceIndGatewayControlProtocol (14) changed; rebuild callers and update persisted values, filters, and comparisons. SCCP, TUP, and ISUP are unchanged.
  • params.UserIdentityUnknown is removed; use params.UnknownCause, still 0.
  • The codec inventory test now reads docs of constants, variables, and types, closing the gap that let the alias escape detection.