<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/diameter/include, branch OTP-19.1.1</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>update copyright-year</title>
<updated>2016-03-15T14:19:56+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2016-03-15T14:19:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=6664eed554974336909d3ffe03f20349cc4c38fd'/>
<id>6664eed554974336909d3ffe03f20349cc4c38fd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'anders/diameter/M-bit/OTP-12947' into maint</title>
<updated>2015-09-14T21:41:46+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-09-14T21:41:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a8d17f7e69e853d1bc858e72dc9daf6beed30f19'/>
<id>a8d17f7e69e853d1bc858e72dc9daf6beed30f19</id>
<content type='text'>
* anders/diameter/M-bit/OTP-12947:
  Add service_opt() strict_mbit
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/M-bit/OTP-12947:
  Add service_opt() strict_mbit
</pre>
</div>
</content>
</entry>
<entry>
<title>Add service_opt() strict_mbit</title>
<updated>2015-08-24T22:03:03+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-08-24T14:14:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=502189ba42469d3332bc0658caa2bd0de1e3fcb9'/>
<id>502189ba42469d3332bc0658caa2bd0de1e3fcb9</id>
<content type='text'>
There are differing opinions on whether or not reception of an arbitrary
AVP setting the M-bit is an error. 1.3.4 of RFC 6733 says this about
how an existing Diameter application may be modified:

   o  The M-bit allows the sender to indicate to the receiver whether or
      not understanding the semantics of an AVP and its content is
      mandatory.  If the M-bit is set by the sender and the receiver
      does not understand the AVP or the values carried within that AVP,
      then a failure is generated (see Section 7).

   It is the decision of the protocol designer when to develop a new
   Diameter application rather than extending Diameter in other ways.
   However, a new Diameter application MUST be created when one or more
   of the following criteria are met:

   M-bit Setting

      An AVP with the M-bit in the MUST column of the AVP flag table is
      added to an existing Command/Application.  An AVP with the M-bit
      in the MAY column of the AVP flag table is added to an existing
      Command/Application.

The point here is presumably interoperability: that the command grammar
should specify explicitly what mandatory AVPs much be understood, and
that anything more is an error.

On the other hand, 3.2 says thus about command grammars:

   avp-name         = avp-spec / "AVP"
                      ; The string "AVP" stands for *any* arbitrary AVP
                      ; Name, not otherwise listed in that Command Code
                      ; definition.  The inclusion of this string
                      ; is recommended for all CCFs to allow for
                      ; extensibility.

This renders 1.3.4 pointless unless "*any* AVP" is qualified by "not
setting the M-bit", since the sender can effectively violate 1.3.4
without this necessitating an error at the receiver. If clients add
arbitrary AVPs setting the M-bit then request handling becomes more
implementation-dependent.

The current interpretation in diameter is strict: if a command grammar
doesn't explicitly allow an AVP setting the M-bit then reception of such
an AVP is regarded as an error. The strict_mbit option now allows this
behaviour to be changed, false turning all responsibility for the M-bit
over to the user.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are differing opinions on whether or not reception of an arbitrary
AVP setting the M-bit is an error. 1.3.4 of RFC 6733 says this about
how an existing Diameter application may be modified:

   o  The M-bit allows the sender to indicate to the receiver whether or
      not understanding the semantics of an AVP and its content is
      mandatory.  If the M-bit is set by the sender and the receiver
      does not understand the AVP or the values carried within that AVP,
      then a failure is generated (see Section 7).

   It is the decision of the protocol designer when to develop a new
   Diameter application rather than extending Diameter in other ways.
   However, a new Diameter application MUST be created when one or more
   of the following criteria are met:

   M-bit Setting

      An AVP with the M-bit in the MUST column of the AVP flag table is
      added to an existing Command/Application.  An AVP with the M-bit
      in the MAY column of the AVP flag table is added to an existing
      Command/Application.

The point here is presumably interoperability: that the command grammar
should specify explicitly what mandatory AVPs much be understood, and
that anything more is an error.

On the other hand, 3.2 says thus about command grammars:

   avp-name         = avp-spec / "AVP"
                      ; The string "AVP" stands for *any* arbitrary AVP
                      ; Name, not otherwise listed in that Command Code
                      ; definition.  The inclusion of this string
                      ; is recommended for all CCFs to allow for
                      ; extensibility.

This renders 1.3.4 pointless unless "*any* AVP" is qualified by "not
setting the M-bit", since the sender can effectively violate 1.3.4
without this necessitating an error at the receiver. If clients add
arbitrary AVPs setting the M-bit then request handling becomes more
implementation-dependent.

The current interpretation in diameter is strict: if a command grammar
doesn't explicitly allow an AVP setting the M-bit then reception of such
an AVP is regarded as an error. The strict_mbit option now allows this
behaviour to be changed, false turning all responsibility for the M-bit
over to the user.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'maint-17' into maint</title>
<updated>2015-08-13T21:01:28+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-08-13T15:08:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8c5d719afaeae0c9cfa1079c0de5452f8bdc837b'/>
<id>8c5d719afaeae0c9cfa1079c0de5452f8bdc837b</id>
<content type='text'>
The diffs are all about adapting to the OTP 18 time interface. The code
was previously backwards compatible, falling back on the erlang:now/0 if
erlang:monotonic_time/0 is unavailable, but this was seen to be a bad
thing in commit 9c0f2f2c. Use of erlang:now/0 is now removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The diffs are all about adapting to the OTP 18 time interface. The code
was previously backwards compatible, falling back on the erlang:now/0 if
erlang:monotonic_time/0 is unavailable, but this was seen to be a bad
thing in commit 9c0f2f2c. Use of erlang:now/0 is now removed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'anders/diameter/grouped_errors/OTP-12930' into maint-17</title>
<updated>2015-08-13T10:34:03+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2015-08-13T10:34:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=0c21fb612b736f53dcc04face42bd106c50287ae'/>
<id>0c21fb612b736f53dcc04face42bd106c50287ae</id>
<content type='text'>
* anders/diameter/grouped_errors/OTP-12930:
  Fix decode of Grouped AVPs containing errors
  Simplify logic
  Simplify logic
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/grouped_errors/OTP-12930:
  Fix decode of Grouped AVPs containing errors
  Simplify logic
  Simplify logic
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't compute AVP list length unnecessarily at AVP decode</title>
<updated>2015-08-04T15:40:24+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-07-07T11:34:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=9ab5d8afedc6d2f56997276e3f016ec1c6dac6a5'/>
<id>9ab5d8afedc6d2f56997276e3f016ec1c6dac6a5</id>
<content type='text'>
This has had a hugely negative impact on performance when decoding
messages containing many AVP: each decode of an AVP having variable
arity computed the length of the list of previously decoded AVPs when
checking that the allowed arity was not exceeded, even if the allowed
arity was infinite, making for O(n^2) cost. Here are some execution
times, for diameter_codec:decode/2 on a representative message with n
integer AVPs in the Common application (on the host at hand):

             Before      After
             -------     ---------
  n = 1K       5 ms        2 ms
  n = 10K    500 ms       25 ms
  n = 100K    75 sec     225 ms
  n = 1M                   2.6 sec

Note the nearly linear increase following the change.

Remove the dire documentation warning for incoming_maxlen as a
consequence. It can still be useful to set, but not doing so won't have
the same consequences as previously.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has had a hugely negative impact on performance when decoding
messages containing many AVP: each decode of an AVP having variable
arity computed the length of the list of previously decoded AVPs when
checking that the allowed arity was not exceeded, even if the allowed
arity was infinite, making for O(n^2) cost. Here are some execution
times, for diameter_codec:decode/2 on a representative message with n
integer AVPs in the Common application (on the host at hand):

             Before      After
             -------     ---------
  n = 1K       5 ms        2 ms
  n = 10K    500 ms       25 ms
  n = 100K    75 sec     225 ms
  n = 1M                   2.6 sec

Note the nearly linear increase following the change.

Remove the dire documentation warning for incoming_maxlen as a
consequence. It can still be useful to set, but not doing so won't have
the same consequences as previously.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't traverse errors list unnecessarily when detecting missing AVPs</title>
<updated>2015-08-04T15:33:37+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-07-07T07:58:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=16aaa29b7ce40596520d563b6f4a8e0aeba7b085'/>
<id>16aaa29b7ce40596520d563b6f4a8e0aeba7b085</id>
<content type='text'>
Since the list can potentially be long.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the list can potentially be long.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't flag AVP as missing as a consequence of decode error</title>
<updated>2015-08-04T15:33:37+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-06-29T07:09:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=abd6c7494f973eb91c6a582f3370e9896d28992b'/>
<id>abd6c7494f973eb91c6a582f3370e9896d28992b</id>
<content type='text'>
The decode of an incoming Diameter message uses the record
representation to determine whether or not an AVP has been received with
the expected arity, the number of AVPs in each field following decode
being compared with the arity specified in the message grammar. The
problem with this is that decode failure isn't reflected in the record
representation, so that an AVP can be appended to the errors field of a
diameter_packet record despite an entry for the same AVP already
existing. This isn't a fault as much as a misleading error indication,
but now only append AVPs that aren't already represented.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The decode of an incoming Diameter message uses the record
representation to determine whether or not an AVP has been received with
the expected arity, the number of AVPs in each field following decode
being compared with the arity specified in the message grammar. The
problem with this is that decode failure isn't reflected in the record
representation, so that an AVP can be appended to the errors field of a
diameter_packet record despite an entry for the same AVP already
existing. This isn't a fault as much as a misleading error indication,
but now only append AVPs that aren't already represented.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bruce/change-license'</title>
<updated>2015-06-22T13:44:54+00:00</updated>
<author>
<name>Bruce Yinhe</name>
<email>bruce@erlang.org</email>
</author>
<published>2015-06-22T13:42:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8f63667b316cdff10e666b8f5b0b6a92bd722e5a'/>
<id>8f63667b316cdff10e666b8f5b0b6a92bd722e5a</id>
<content type='text'>
OTP-12845

* bruce/change-license:
  fix errors caused by changed line numbers
  Change license text to APLv2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OTP-12845

* bruce/change-license:
  fix errors caused by changed line numbers
  Change license text to APLv2
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'anders/diameter/18/OTP-12588'</title>
<updated>2015-06-21T22:41:09+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-06-21T22:41:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=29bbf6a23a13d3e5956e77e7298515e85170d52a'/>
<id>29bbf6a23a13d3e5956e77e7298515e85170d52a</id>
<content type='text'>
* anders/diameter/18/OTP-12588:
  vsn -&gt; 1.10
  Remove dead upgrade-related code
  Update appup for 18
  Fix release note typo
  Fix comment typo
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/18/OTP-12588:
  vsn -&gt; 1.10
  Remove dead upgrade-related code
  Update appup for 18
  Fix release note typo
  Fix comment typo
</pre>
</div>
</content>
</entry>
</feed>
