Skip to content

v4.6.0

Latest

Choose a tag to compare

@fiorix fiorix released this 31 Oct 23:44
· 14 commits to main since this release

Behavior changes

  • A message whose Application-Id and Command-Code are not in the dictionary no longer fails ReadMessage and no longer closes the connection. It decodes generically and reaches the ALL handler if one is registered, otherwise ErrorReports. This applies with Strict set as well; Strict still governs AVP-level decode errors. AVPs on an application the dictionary does not know decode as datatype.Unknown, so this is not typed support for such applications (for example Cx/Dx). Thanks to @towi for the fix and the reproduction, and to @volkland. (#257)
  • A write error on a TCP or TLS connection now closes the connection. Previously the buffered writer kept returning its first error while the connection stayed open, so after one write that hit Server.WriteTimeout every later answer, DWA and request on that connection failed until the peer's watchdog gave up. Closing it lets CloseNotify fire and the peer fail over. SCTP associations are not closed on a write error, since a failed SCTP send affects only that message. Thanks to @kulcsartibor. (#274)
  • Message.Answer now copies only the P flag from the request. It used to copy every flag except R, so the answer to a retransmitted request went out with the T flag set, which RFC 6733 section 3 forbids. E remains the caller's to set for protocol-error answers. Thanks to @hsdfat. (#276)

State machine fixes

  • With Server.MaxConcurrentHandlers set, a peer's first request after the CEA could be dropped without an answer, because the peer context was stored only after the CEA was written. It is now stored before the CEA goes out. A failed CEA write now closes the connection. Thanks to @kulcsartibor. (#274)
  • The CEA now carries the server's own Origin-State-Id, Settings.OriginStateID, the same value as its DWA, and none when it is unset. It used to echo the Origin-State-Id from the peer's CER. Since v4.5.0 the DWA carries the configured value (#264), so the CEA and the first DWA disagreed, and peers that track Origin-State-Id (RFC 6733 section 8.16), such as freeDiameter, reset the connection on the first watchdog exchange. Servers that leave Settings.OriginStateID unset no longer send an Origin-State-Id in the CEA. Found with interop tests against freeDiameter.

Housekeeping

  • Source files are gofmt-clean again, and the README states the Go 1.26 minimum that go.mod requires.

No public API changes. Library dependencies and the minimum Go version (1.26) are unchanged.

Full Changelog: v4.5.1...v4.6.0