From ac3d0c96f399757ed8cda797cab5d4eacbdbf482 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Mon, 14 Jan 2013 18:06:07 +0100 Subject: Reverse swapped arguments The fault caused a handle_request callback to fail whenever an eval tuple was returned. Introduced in commit f24adb28. --- lib/diameter/src/base/diameter_service.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index a4a0b80348..66c526b379 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2012. All Rights Reserved. +%% Copyright Ericsson AB 2010-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -2049,7 +2049,7 @@ request_cb({eval_packet, RC, F}, App, Mask, T, TC, Fs, Pkt) -> request_cb(RC, App, Mask, T, TC, [F|Fs], Pkt); request_cb({eval, RC, F}, App, Mask, T, TC, Fs, Pkt) -> - request_cb(RC, App, Mask, T, TC, Pkt, Fs), + request_cb(RC, App, Mask, T, TC, Fs, Pkt), diameter_lib:eval(F). %% protocol_error/5 -- cgit v1.2.3 From c54afd82145b2559dd150c15f71625a370f77ecb Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 15 Jan 2013 12:28:09 +0100 Subject: Add a testcase --- lib/diameter/test/diameter_traffic_SUITE.erl | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index c157b0e304..6251664e3c 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2012. All Rights Reserved. +%% Copyright Ericsson AB 2010-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -38,6 +38,7 @@ result_codes/1, send_ok/1, send_nok/1, + send_eval/1, send_bad_answer/1, send_arbitrary/1, send_unknown/1, @@ -209,6 +210,7 @@ end_per_testcase(_, _) -> tc() -> [send_ok, send_nok, + send_eval, send_bad_answer, send_arbitrary, send_unknown, @@ -310,6 +312,14 @@ send_nok(Config) -> #'diameter_base_answer-message'{'Result-Code' = ?INVALID_AVP_BITS} = call(Config, Req). +%% Send an ACR and expect success. +send_eval(Config) -> + Req = ['ACR', {'Accounting-Record-Type', ?EVENT_RECORD}, + {'Accounting-Record-Number', 3}], + + #diameter_base_accounting_ACA{'Result-Code' = ?SUCCESS} + = call(Config, Req). + %% Send an accounting ACR that the server tries to answer with an %% inappropriate header, resulting in no answer being sent and the %% request timing out. @@ -782,6 +792,19 @@ request(#diameter_base_accounting_ACR{'Session-Id' = SId, {reply, #diameter_packet{header = #diameter_header{is_error = true},%% not msg = Ans}}; +request(#diameter_base_accounting_ACR{'Session-Id' = SId, + 'Accounting-Record-Type' = RT, + 'Accounting-Record-Number' = 3 = RN}, + #diameter_caps{origin_host = {OH, _}, + origin_realm = {OR, _}}) -> + Ans = ['ACA', {'Result-Code', ?SUCCESS}, + {'Session-Id', SId}, + {'Origin-Host', OH}, + {'Origin-Realm', OR}, + {'Accounting-Record-Type', RT}, + {'Accounting-Record-Number', RN}], + {eval, {reply, Ans}, {erlang, now, []}}; + request(#diameter_base_accounting_ACR{'Session-Id' = SId, 'Accounting-Record-Type' = RT, 'Accounting-Record-Number' = RN}, -- cgit v1.2.3 From a2421a65c03d67e1cb6ca09cdbac71be318584b1 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 15 Jan 2013 16:20:25 +0100 Subject: Traffic suite comments plus a minor match tweak --- lib/diameter/test/diameter_traffic_SUITE.erl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index 6251664e3c..142b28a4c2 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -773,10 +773,12 @@ handle_request(#diameter_packet{header = H, msg = M}, ?SERVER, {_Ref, Caps}) -> V = HI bsr B, %% request(M, Caps). +%% send_nok request(#diameter_base_accounting_ACR{'Accounting-Record-Number' = 0}, _) -> {eval_packet, {protocol_error, ?INVALID_AVP_BITS}, [fun log/2, invalid]}; +%% send_bad_answer request(#diameter_base_accounting_ACR{'Session-Id' = SId, 'Accounting-Record-Type' = RT, 'Accounting-Record-Number' = 2 = RN}, @@ -792,6 +794,7 @@ request(#diameter_base_accounting_ACR{'Session-Id' = SId, {reply, #diameter_packet{header = #diameter_header{is_error = true},%% not msg = Ans}}; +%% send_eval request(#diameter_base_accounting_ACR{'Session-Id' = SId, 'Accounting-Record-Type' = RT, 'Accounting-Record-Number' = 3 = RN}, @@ -805,9 +808,10 @@ request(#diameter_base_accounting_ACR{'Session-Id' = SId, {'Accounting-Record-Number', RN}], {eval, {reply, Ans}, {erlang, now, []}}; +%% send_ok request(#diameter_base_accounting_ACR{'Session-Id' = SId, 'Accounting-Record-Type' = RT, - 'Accounting-Record-Number' = RN}, + 'Accounting-Record-Number' = 1 = RN}, #diameter_caps{origin_host = {OH, _}, origin_realm = {OR, _}}) -> {reply, ['ACA', {'Result-Code', ?SUCCESS}, @@ -827,16 +831,19 @@ request(#diameter_base_ASR{'Session-Id' = SId, 'Origin-Realm' = OR, 'AVP' = Avps}}; +%% send_noreply request(#diameter_base_STR{'Termination-Cause' = T}, _Caps) when T /= ?LOGOUT -> discard; +%% send_destination_5 request(#diameter_base_STR{'Destination-Realm'= R}, #diameter_caps{origin_realm = {OR, _}}) when R /= undefined, R /= OR -> {protocol_error, ?REALM_NOT_SERVED}; +%% send_destination_6 request(#diameter_base_STR{'Destination-Host'= [H]}, #diameter_caps{origin_host = {OH, _}}) when H /= OH -> @@ -850,6 +857,7 @@ request(#diameter_base_STR{'Session-Id' = SId}, 'Origin-Host' = OH, 'Origin-Realm' = OR}}; +%% send_error request(#diameter_base_RAR{}, _Caps) -> receive after 2000 -> ok end, {protocol_error, ?TOO_BUSY}. -- cgit v1.2.3 From 8ecaddf068f23c243ad321e10b439393512be697 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 15 Jan 2013 17:30:00 +0100 Subject: Update appup --- lib/diameter/src/base/diameter.appup.src | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'lib') diff --git a/lib/diameter/src/base/diameter.appup.src b/lib/diameter/src/base/diameter.appup.src index 5655f98c1b..a04a387918 100644 --- a/lib/diameter/src/base/diameter.appup.src +++ b/lib/diameter/src/base/diameter.appup.src @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2012. All Rights Reserved. +%% Copyright Ericsson AB 2010-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -24,27 +24,9 @@ {"0.10", [{restart_application, diameter}]}, {"1.0", [{restart_application, diameter}]}, {"1.1", [{restart_application, diameter}]}, - {"1.2", [{load, diameter}, - {load, diameter_capx}, - {load, diameter_codec}, - {load, diameter_peer}, - {load, diameter_reg}, - %% order significant from here - {load, diameter_session}, - {load, diameter_peer_fsm}, - {load, diameter_service}, - {load, diameter_watchdog}, - {load, diameter_config}]}, - {"1.2.1", [{load, diameter}, - {load, diameter_capx}, - {load, diameter_peer}, - {load, diameter_reg}, - %% order significant from here - {load, diameter_session}, - {load, diameter_peer_fsm}, - {load, diameter_service}, - {load, diameter_watchdog}, - {load, diameter_config}]} + {"1.2", [{restart_application, diameter}]}, + {"1.2.1", [{restart_application, diameter}]}, + {"1.3", [{load_module, diameter_service}]} ], [ {"0.9", [{restart_application, diameter}]}, @@ -52,6 +34,7 @@ {"1.0", [{restart_application, diameter}]}, {"1.1", [{restart_application, diameter}]}, {"1.2", [{restart_application, diameter}]}, - {"1.2.1", [{restart_application, diameter}]} + {"1.2.1", [{restart_application, diameter}]}, + {"1.3", [{load_module, diameter_service}]} ] }. -- cgit v1.2.3 From 5ba9aaf86685768eeffa672df42a107368d3b8b9 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 15 Jan 2013 17:30:41 +0100 Subject: vsn -> 1.3.1 --- lib/diameter/vsn.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk index c9f74ffcec..7b2208137b 100644 --- a/lib/diameter/vsn.mk +++ b/lib/diameter/vsn.mk @@ -2,7 +2,7 @@ # %CopyrightBegin% # -# Copyright Ericsson AB 2010-2012. All Rights Reserved. +# Copyright Ericsson AB 2010-2013. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -18,7 +18,7 @@ # %CopyrightEnd% APPLICATION = diameter -DIAMETER_VSN = 1.3 +DIAMETER_VSN = 1.3.1 PRE_VSN = APP_VSN = "$(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)" -- cgit v1.2.3 From 2b0c190aa88716b24866b0a751cfe6252348ab00 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 15 Jan 2013 17:34:19 +0100 Subject: Update release notes --- lib/diameter/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib') diff --git a/lib/diameter/doc/src/notes.xml b/lib/diameter/doc/src/notes.xml index d448b01eba..d241e2bd19 100644 --- a/lib/diameter/doc/src/notes.xml +++ b/lib/diameter/doc/src/notes.xml @@ -42,6 +42,22 @@ first.

+
Diameter 1.3.1 + +
Known Bugs and Problems + + +

+ Fix function clause resulting from use of an eval + callback.

+

+ Own Id: OTP-10685

+
+
+
+ +
+
Diameter 1.3
Fixed Bugs and Malfunctions -- cgit v1.2.3