From 09e51b177e0b2c1528c99bdd1c354319e07bc421 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sat, 7 Mar 2015 14:22:11 +0100 Subject: 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. --- lib/diameter/src/base/diameter_peer_fsm.erl | 10 ++++++++++ 1 file changed, 10 insertions(+) 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), -- cgit v1.2.3