aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_peer_fsm.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-03-07 14:22:11 +0100
committerAnders Svensson <[email protected]>2015-03-22 10:04:57 +0100
commit09e51b177e0b2c1528c99bdd1c354319e07bc421 (patch)
treefc0311c4109e93e9cbfb9f8234f59b7c521c4961 /lib/diameter/src/base/diameter_peer_fsm.erl
parentc0ae6c1bb77e69d69d898965e472ce7633a13404 (diff)
downloadotp-09e51b177e0b2c1528c99bdd1c354319e07bc421.tar.gz
otp-09e51b177e0b2c1528c99bdd1c354319e07bc421.tar.bz2
otp-09e51b177e0b2c1528c99bdd1c354319e07bc421.zip
Discard CER or DWR sent with diameter:call/4
These are requests that diameter itself sends. It's previously been possible to send them, but answers timed out at the caller since they were discarded in diameter_watchdog. Answers will still timeout, but now the requests are discarded before being sent.
Diffstat (limited to 'lib/diameter/src/base/diameter_peer_fsm.erl')
-rw-r--r--lib/diameter/src/base/diameter_peer_fsm.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl
index dcfcb63808..9ff6845ab7 100644
--- a/lib/diameter/src/base/diameter_peer_fsm.erl
+++ b/lib/diameter/src/base/diameter_peer_fsm.erl
@@ -698,6 +698,16 @@ outgoing(#diameter_packet{header = #diameter_header{application_id = 0,
invalid(false, dpr_after_dpr, H) %% already sent: discard
end;
+%% Explict CER or DWR: discard. These are sent by us.
+outgoing(#diameter_packet{header = #diameter_header{application_id = 0,
+ cmd_code = C,
+ is_request = true}
+ = H},
+ _)
+ when 257 == C; %% CER
+ 280 == C -> %% DWR
+ invalid(false, invalid_request, H);
+
%% DPR not sent: send.
outgoing(Msg, #state{transport = TPid, dpr = false}) ->
send(TPid, Msg),