Documentation
¶
Overview ¶
Package errors defines the sentinel errors returned by the radius library.
All errors use the "radius: " prefix and are comparable with errors.Is, enabling callers to branch on specific failure modes without string matching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrShortBuffer = New("buffer too short") ErrInvalidLength = New("invalid length field") )
Buffer and framing errors.
View Source
var ( ErrInvalidCode = New("invalid code") ErrAuthenticatorMismatch = New("authenticator mismatch") )
Packet-level errors.
View Source
var ( ErrInvalidAttribute = New("invalid attribute") ErrAttributeTooLong = New("attribute value exceeds 253 octets") ErrUnknownAttribute = New("unknown attribute type") )
Attribute-level errors.
View Source
var ( ErrSecretEmpty = New("shared secret must not be empty") ErrPasswordTooLong = New("password exceeds 128 octets") )
Crypto and secret errors.
View Source
var ( ErrMessageAuthenticatorMissing = New("message-authenticator required but missing") ErrMessageAuthenticatorMismatch = New("message-authenticator verification failed") )
Message-Authenticator (RFC 2869 §5.14) errors.
View Source
var ( // ErrTimeout indicates a context deadline was exceeded while waiting // for a network operation. Wrap-aware callers may also match // context.DeadlineExceeded directly. ErrTimeout = New("operation timed out") // ErrConnClosed is returned by ReadPacket / SendPacket / Exchange after // the underlying socket or TCP connection has been closed. ErrConnClosed = New("connection closed") // ErrMalformedPacket indicates a TCP framing failure: the RADIUS Length // field is out of bounds, attributes do not fill the declared Length, or // a partial read could not be completed. Per RFC 6613 §2.6.4 the caller // should close the TCP connection when this is returned. ErrMalformedPacket = New("malformed RADIUS packet") // ErrUnknownPeer is returned by UDPClient.Exchange when a reply is // received from a source address that does not match the configured // server. Per RFC 2865 §3 the stray packet is silently discarded and // Exchange continues to wait for the legitimate reply (subject to the // context deadline). ErrUnknownPeer = New("packet from unknown peer") )
Transport-layer errors. Returned by the transport package for network and framing failures; safe to branch on with errors.Is.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.