diff options
author | Anders Svensson <[email protected]> | 2012-11-15 15:05:26 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2012-11-15 16:09:59 +0100 |
commit | 62403f98c887a1b2e99e41da576c171c29d59193 (patch) | |
tree | 2900dbb34bad6b555fad09bfdef2e523411ec6d8 /lib/diameter | |
parent | 4ddc8f40399d7c4856d0c8f9463832012c25002f (diff) | |
download | otp-62403f98c887a1b2e99e41da576c171c29d59193.tar.gz otp-62403f98c887a1b2e99e41da576c171c29d59193.tar.bz2 otp-62403f98c887a1b2e99e41da576c171c29d59193.zip |
Add check of End-to-End and Hop-by-Hop identfiers in received DPA
Diffstat (limited to 'lib/diameter')
-rw-r--r-- | lib/diameter/src/base/diameter_peer_fsm.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl index 3cf1129d59..e06dc136ce 100644 --- a/lib/diameter/src/base/diameter_peer_fsm.erl +++ b/lib/diameter/src/base/diameter_peer_fsm.erl @@ -592,16 +592,16 @@ rcv(N, Pkt, S) N == 'DPR' -> handle_request(N, Pkt, S); -%% DPA even though we haven't sent DPR: ignore. -rcv('DPA', _Pkt, #state{dpr = false}) -> - ok; - -%% DPA in response to DPR. We could check the sequence numbers but -%% don't bother, just close. -rcv('DPA' = N, _Pkt, #state{transport = TPid}) -> +%% DPA in response to DPR and with the expected identifiers. +rcv('DPA' = N, + #diameter_packet{header = #diameter_header{end_to_end_id = Eid, + hop_by_hop_id = Hid}}, + #state{transport = TPid, + dpr = {Hid, Eid}}) -> diameter_peer:close(TPid), {stop, N}; +%% Ignore anything else, an unsolicited DPA in particular. rcv(_, _, _) -> ok. |