Skip to content

Commit ebe3aa0

Browse files
committed
Restore QoS characteristics TLV width
1 parent a2a945e commit ebe3aa0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lltdDaemon/lltdTlvOps.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,12 @@ size_t setHardwareIdTLV(void *buffer, uint64_t offset){
238238
//TODO: see if there really is support for Level2 Forwarding.. ? or just leave it hardcoded
239239
size_t setQosCharacteristicsTLV(void *buffer, uint64_t offset){
240240
generic_tlv_t *QosCharacteristicsTLV = (generic_tlv_t *) (buffer + offset);
241-
uint16_t *qosCharacteristics = (uint16_t *)(buffer + offset + sizeof(generic_tlv_t));
241+
uint32_t *qosCharacteristics = (uint32_t *)(buffer + offset + sizeof(generic_tlv_t));
242242
QosCharacteristicsTLV->TLVType = tlv_qos_characteristics;
243243
QosCharacteristicsTLV->TLVLength = sizeof(*qosCharacteristics);
244-
// QoS flags are 16-bit values in network order
245-
*qosCharacteristics = htons(Config_TLV_QOS_L2Fwd | Config_TLV_QOS_PrioTag | Config_TLV_QOS_VLAN);
246-
return sizeof(generic_tlv_t) + sizeof(uint16_t);
244+
// QoS flags are in upper 16 bits of 32-bit value
245+
*qosCharacteristics = htonl((Config_TLV_QOS_L2Fwd | Config_TLV_QOS_PrioTag | Config_TLV_QOS_VLAN) << 16);
246+
return sizeof(generic_tlv_t) + sizeof(uint32_t);
247247
}
248248

249249
// Detailed Icon TLV - sends the detailed icon image (multi-resolution ICO)

0 commit comments

Comments
 (0)