Commit 8249256f authored by Sven Meier's avatar Sven Meier

msg: reset ext_specific flags in the announce to zero when either no TLV is…

msg: reset ext_specific flags in the announce to zero when either no TLV is appended or the TLV is not a WR TLV

The flags was not set to any value when no TLV was appended or a wrong TLV was appended, in that
case the RAM content was wrongly propagated as WR flags which may caused that a node is going into
a wrong state.
parent 6c05e20c
......@@ -271,6 +271,8 @@ static void wr_unpack_announce(void *buf, MsgAnnounce *ann)
pp_diag(NULL, ext, 2, "hook: %s\n", __func__);
if (msg_len >= WR_ANNOUNCE_LENGTH)
msg_unpack_announce_wr_tlv(buf, ann);
else
ann->ext_specific = 0;
}
/* State decision algorithm 9.3.3 Fig 26 with extension for wr */
......
......@@ -107,7 +107,8 @@ void msg_unpack_announce_wr_tlv(void *buf, MsgAnnounce *ann)
tlv_versionNumber == WR_TLV_WR_VERSION_NUMBER &&
tlv_wrMessageID == ANN_SUFIX) {
ann->ext_specific = (UInteger16)get_be16(buf+76);
}
} else
ann->ext_specific = 0;
}
/* White Rabbit: packing WR Signaling messages*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment