---

** [tickets:#3097] mds: Incorrect fragment decoding for MDS_PROT_FCTRL_ID**

**Status:** assigned
**Milestone:** 5.19.10
**Created:** Fri Oct 04, 2019 05:35 AM UTC by Minh Hon Chau
**Last Updated:** Fri Oct 04, 2019 05:35 AM UTC
**Owner:** Minh Hon Chau


The current code that decodes protocol identifier

~~~
  if ((pro_ver_ & MDS_PROT_VER_MASK) == MDS_PROT_FCTRL) {
    // decode flow control sequence number
    ptr = &msg[HeaderMessage::FieldIndex::kFlowControlSequenceNumber];
    fseq_ = ncs_decode_16bit(&ptr);
    // decode protocol identifier
    ptr = &msg[ChunkAck::FieldIndex::kProtocolIdentifier];
    pro_id_ = ncs_decode_32bit(&ptr);
    if (pro_id_ == MDS_PROT_FCTRL_ID) {
      // decode message type
      ptr = &msg[ChunkAck::FieldIndex::kFlowControlMessageType];
      msg_type_ = ncs_decode_8bit(&ptr);
    }
  }
~~~
  
In case of fragmentation, the last fragment has pro_ver = MDS_PROT_FCTRL, and 
coincidently the next 4 bytes (oct11 -> oct14)  has the same value to 
MDS_PROT_FCTRL_ID. Therefore, mds thinks this fragment as ack/nack message, 
which is wrong.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to