The aim of this page is to clarify t_relay()
behaviour and response codes in case of failure.
The documentation of t_relay()
function is a bit confusing and not well detailed. Let's examine some sections of the function documentation:
The coresponding transaction may or may not be already created. If not yet created, the function will automatically create it.
t_relay()
returns a negative code the transaction is not created.t_relay()
.t_relay()
.In case of error, the function returns the following codes:
-1 - generic internal error
-2 - bad message (parsing errors)
-3 - no destination available (no branches were added or request already cancelled)
-4 - bad destination (unresolvable address)
-5 - destination filtered (black listed)
-6 - generic send failed
failure_route
is invoked when the destination transport is UDP?failure_route
is executed. If the destination IP is not routable (not routes or default gw for it) then t_relay(UDP) returns -6 and failure_route
is not executed.failure_route
is invoked when the destination transport is TCP?failure_route
is not executed.failure_route
is not executed. This is because the TCP connection couldn't be established.