<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/diameter/include, branch OTP-18.0.2</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<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>
<entry>
<title>Change license text to APLv2</title>
<updated>2015-06-18T09:31:02+00:00</updated>
<author>
<name>Bruce Yinhe</name>
<email>bruce@erlang.org</email>
</author>
<published>2015-06-18T09:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=738c34d4bb8f1a3811acd00af8c6c12107f8315b'/>
<id>738c34d4bb8f1a3811acd00af8c6c12107f8315b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix decode of Grouped AVPs containing errors</title>
<updated>2015-06-17T22:41:37+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-06-15T15:46:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7f4f9583bb1245c27ca58d88fe6862498a2df1f2'/>
<id>7f4f9583bb1245c27ca58d88fe6862498a2df1f2</id>
<content type='text'>
RFC 6733 says this of Failed-AVP in 7.5:

   In the case where the offending AVP is embedded within a Grouped AVP,
   the Failed-AVP MAY contain the grouped AVP, which in turn contains
   the single offending AVP.  The same method MAY be employed if the
   grouped AVP itself is embedded in yet another grouped AVP and so on.
   In this case, the Failed-AVP MAY contain the grouped AVP hierarchy up
   to the single offending AVP.  This enables the recipient to detect
   the location of the offending AVP when embedded in a group.

It says this of DIAMETER_INVALID_AVP_LENGTH in 7.1.5:

      The request contained an AVP with an invalid length.  A Diameter
      message indicating this error MUST include the offending AVPs
      within a Failed-AVP AVP.  In cases where the erroneous AVP length
      value exceeds the message length or is less than the minimum AVP
      header length, it is sufficient to include the offending AVP
      header and a zero filled payload of the minimum required length
      for the payloads data type.  If the AVP is a Grouped AVP, the
      Grouped AVP header with an empty payload would be sufficient to
      indicate the offending AVP.  In the case where the offending AVP
      header cannot be fully decoded when the AVP length is less than
      the minimum AVP header length, it is sufficient to include an
      offending AVP header that is formulated by padding the incomplete
      AVP header with zero up to the minimum AVP header length.

The AVPs placed in the errors field of a diameter_packet record are
intended to be appropriate for inclusion in a Failed-AVP, but neither of
the above paragraphs has been followed in the Grouped case: the entire
faulty AVP (non-faulty components and all) has been included. This made
it impossible to identify the actual faulty AVP in all but simple case.

This commit adapts the decode to the RFC, and implements the suggested
single faulty AVP, nested in as many Grouped containers as required.
The best-effort decode of Failed-AVP in answer messages, initially
implemented in commit 0f9cdbaf, is also applied.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RFC 6733 says this of Failed-AVP in 7.5:

   In the case where the offending AVP is embedded within a Grouped AVP,
   the Failed-AVP MAY contain the grouped AVP, which in turn contains
   the single offending AVP.  The same method MAY be employed if the
   grouped AVP itself is embedded in yet another grouped AVP and so on.
   In this case, the Failed-AVP MAY contain the grouped AVP hierarchy up
   to the single offending AVP.  This enables the recipient to detect
   the location of the offending AVP when embedded in a group.

It says this of DIAMETER_INVALID_AVP_LENGTH in 7.1.5:

      The request contained an AVP with an invalid length.  A Diameter
      message indicating this error MUST include the offending AVPs
      within a Failed-AVP AVP.  In cases where the erroneous AVP length
      value exceeds the message length or is less than the minimum AVP
      header length, it is sufficient to include the offending AVP
      header and a zero filled payload of the minimum required length
      for the payloads data type.  If the AVP is a Grouped AVP, the
      Grouped AVP header with an empty payload would be sufficient to
      indicate the offending AVP.  In the case where the offending AVP
      header cannot be fully decoded when the AVP length is less than
      the minimum AVP header length, it is sufficient to include an
      offending AVP header that is formulated by padding the incomplete
      AVP header with zero up to the minimum AVP header length.

The AVPs placed in the errors field of a diameter_packet record are
intended to be appropriate for inclusion in a Failed-AVP, but neither of
the above paragraphs has been followed in the Grouped case: the entire
faulty AVP (non-faulty components and all) has been included. This made
it impossible to identify the actual faulty AVP in all but simple case.

This commit adapts the decode to the RFC, and implements the suggested
single faulty AVP, nested in as many Grouped containers as required.
The best-effort decode of Failed-AVP in answer messages, initially
implemented in commit 0f9cdbaf, is also applied.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify logic</title>
<updated>2015-06-17T19:15:31+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-06-17T11:31:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=552962544c812caa1005094f3a0a00e05556565b'/>
<id>552962544c812caa1005094f3a0a00e05556565b</id>
<content type='text'>
Testing is_failed() is unnecessary since put/2 a second time will
return a previously put 'true'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Testing is_failed() is unnecessary since put/2 a second time will
return a previously put 'true'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify logic</title>
<updated>2015-06-17T19:14:51+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-06-17T11:27:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=596848c0b7b752ebf1ed31873de39ad729dc54b4'/>
<id>596848c0b7b752ebf1ed31873de39ad729dc54b4</id>
<content type='text'>
Failed == undefined implies is_failed() == true. This was true even when
the code was written, in commit c2c00fdd.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Failed == undefined implies is_failed() == true. This was true even when
the code was written, in commit c2c00fdd.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix comment typo</title>
<updated>2015-06-17T12:44:58+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-03-20T14:11:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f242133f5b5fe0ca03e039120c6165dcef179c4f'/>
<id>f242133f5b5fe0ca03e039120c6165dcef179c4f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove extra avp bit from diameter_avp decode</title>
<updated>2015-04-03T09:55:04+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-04-03T09:17:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1732c9c9bd6b261cb18f2ff174a8c4d1b9488f3e'/>
<id>1732c9c9bd6b261cb18f2ff174a8c4d1b9488f3e</id>
<content type='text'>
In the case of a faulty AVP Length (pointing past the end of a message
or not spanning the header), an extra bit is prepended to data bytes in
diameter_avp:collect_avps/1 in order to force a 5014 decode error. The
bit is supposed to be removed as part of the decode in diameter_gen.hrl
but this didn't happen in case of an AVP that unknown to the dictionary
in question.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case of a faulty AVP Length (pointing past the end of a message
or not spanning the header), an extra bit is prepended to data bytes in
diameter_avp:collect_avps/1 in order to force a 5014 decode error. The
bit is supposed to be removed as part of the decode in diameter_gen.hrl
but this didn't happen in case of an AVP that unknown to the dictionary
in question.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove potentially large error reason in call to diameter_lib:log/4</title>
<updated>2015-03-27T12:52:29+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-03-26T22:07:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=39acfdb005626ae1bf2f68808f9e8116637c7121'/>
<id>39acfdb005626ae1bf2f68808f9e8116637c7121</id>
<content type='text'>
The function is intended to be traced on, to see abnormalities (mostly)
without producing excessive output. In the case of decode failure, the
error reason can be things like {badmatch, HugeBinary}.

Missed in commit 0058430.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function is intended to be traced on, to see abnormalities (mostly)
without producing excessive output. In the case of decode failure, the
error reason can be things like {badmatch, HugeBinary}.

Missed in commit 0058430.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix handling of length errors on Grouped AVPs</title>
<updated>2015-03-04T07:56:33+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2015-02-16T10:32:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a63a93e6f16368fb82d24b8efd8f8ff9aabf8013'/>
<id>a63a93e6f16368fb82d24b8efd8f8ff9aabf8013</id>
<content type='text'>
The decode of a Grouped AVP ignored the case that extracting component
AVPs with diameter_codec:collect_avps/1 returned a tuple, in the case of
a truncated AVP header.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The decode of a Grouped AVP ignored the case that extracting component
AVPs with diameter_codec:collect_avps/1 returned a tuple, in the case of
a truncated AVP header.
</pre>
</div>
</content>
</entry>
</feed>
