build(deps): bump go-m3ua and go-sctp; the examples carry the network indicator
Merged
GO
16d ago+51+51+01234567890123456789-81-81-01234567890123456789
The examples move to the current go-m3ua and go-sctp main (go-m3ua 6002607, go-sctp 001e3dd; go-m3ua now brings go-ctxsync), and use the network indicator the stack carries since #20.
- ASP:
-nisetsStackConfig.NetworkIndicator. Received DATA passes its NI to the stack, and every DATA it sends uses the NI of itsTransferRequest. - SGP: the example no longer keeps its own table from point code to association, learnt from incoming DATA. go-m3ua already provides the SGP distribution function of RFC 4666 §1.4.2.4:
Listener.DistributeDatapicks the ASPs of the Application Server by its traffic mode (§4.3.4.3) and queues while the AS is pending. The stack's messages go to it with the NI of theirTransferRequest, so there is no per-network route for the example to track (192 → about 160 lines). errors.AsTypereplaceserrors.As.
This answers the review of #20: with it, both bundled examples propagate the indicator.
Verification
- examples:
go build,go vet, staticcheck, golangci-lint clean; no retracted module in the build list (go list -m -retracted all). - The ASP and SGP examples over M3UA/SCTP between two Linux containers, captured with tshark at the SGP. The ASP sends return-on-error user data to a subsystem the SGP does not have, and the SGP's stack returns it:
| Scenario | Request NI | Reply NI |
|---|---|---|
Before: DistributeData on the library without the NI | 2 | 0, wrong network |
-ni 2 | 2 | 2: UDTS, cause 0x04 |
| default | 0 | 0 |
-ni 2 -segmentation-threshold 160 | 2 (two XUDT segments) | 2: one XUDTS with the first segment's segmentation parameter |
Every reply carries Routing Context 1 and swaps OPC and DPC (514 → 257). The ASP reports one N-NOTICE per run, and Wireshark shows no expert information. Before this change, the reply table and DistributeData returned the same UDTS and XUDTS frames.
Summary by cubic
Updates the bundled examples to the current go-m3ua and go-sctp and to carry the network indicator, so replies leave in the same network as the request they answer.
Changes
- The ASP's
-niflag now setsStackConfig.NetworkIndicator; received DATA carries its NI into the stack, and outgoing DATA uses the NI of itsTransferRequest. - The SGP drops its hand-rolled point-code-to-association table;
Listener.DistributeDatanow routes responses by RFC 4666 §4.3.4.3 traffic mode. The example serves one Application Server; a multi-AS gateway would pick the AS from its routing keys. errors.AsTypereplaceserrors.As, andgo-ctxsyncjoins the build as an indirect dependency.