Uploaded image for project: 'OASIS Message Queuing Telemetry Transport (MQTT) TC'
  1. OASIS Message Queuing Telemetry Transport (MQTT) TC
  2. MQTT-307

Clarify Handling of DISCONNECT Expiry interval error in WD04

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: wd04, 5
    • Fix Version/s: 5, wd10
    • Component/s: core
    • Labels:
    • Proposal:
      Hide

      The server sends a DISCONNECT packet indicating a protocol error rc=0x82 in response to receiving DISCONNECT with an invalid Session Expiry.

      Show
      The server sends a DISCONNECT packet indicating a protocol error rc=0x82 in response to receiving DISCONNECT with an invalid Session Expiry.

      Description

      WD04 Section 3.14 Line 1833 says "If the Session State Expiry interval in the CONNECT packet was zero it is a protocol error to set a non zero Session Expiry in the DISCONNECT packet"

      The text does not state how this error should be handled by the recipient. I don't think it would hurt to say 'The erroneous value will be treated as a zero, and the processing of the DISCONNECT message will proceed as described in section 3.14 (which says it MUST close the network connection and not send any more control packets, and not trigger a WILL message if the DISCONNECT return code is less than 128).

        Attachments

          Activity

          Hide
          andrew_banks Andrew Banks (Inactive) added a comment -

          Fixed in WD10

          Show
          andrew_banks Andrew Banks (Inactive) added a comment - Fixed in WD10
          Hide
          ken.borgendale Ken Borgendale (Inactive) added a comment -

          I still do not see the point in this and it just seems like special processing for DISCONNECT. There are quite a number of errors which can happen in common code while parsing DISCONNECT most of which will fall into some category of malformed packet or protocol error. If the receiver responds to these by sending a DISCONNECT and closing the connection it would be consistent with all other packets. I understand that this will create a race condition as the sender is probably about to close the network connection itself. Do we care which of the two completes first and closes the connection? There are a number of cases where we have similar race conditions to close a connection.

          Show
          ken.borgendale Ken Borgendale (Inactive) added a comment - I still do not see the point in this and it just seems like special processing for DISCONNECT. There are quite a number of errors which can happen in common code while parsing DISCONNECT most of which will fall into some category of malformed packet or protocol error. If the receiver responds to these by sending a DISCONNECT and closing the connection it would be consistent with all other packets. I understand that this will create a race condition as the sender is probably about to close the network connection itself. Do we care which of the two completes first and closes the connection? There are a number of cases where we have similar race conditions to close a connection.
          Hide
          ken.borgendale Ken Borgendale (Inactive) added a comment -

          Issue included in MQTTv5.0 CS01 December 25, 2017

          Show
          ken.borgendale Ken Borgendale (Inactive) added a comment - Issue included in MQTTv5.0 CS01 December 25, 2017

            People

            • Assignee:
              andrew_banks Andrew Banks (Inactive)
              Reporter:
              edbriggs Ed Briggs [X] (Inactive)
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: