avoid hton conversion on empty management msgs
Signed-off-by: Geoff Salmon <gsalmon@se-instruments.com>master
parent
c547145834
commit
a299ca1e90
1
tlv.c
1
tlv.c
|
@ -269,6 +269,7 @@ void tlv_pre_send(struct TLV *tlv)
|
||||||
switch (tlv->type) {
|
switch (tlv->type) {
|
||||||
case TLV_MANAGEMENT:
|
case TLV_MANAGEMENT:
|
||||||
mgt = (struct management_tlv *) tlv;
|
mgt = (struct management_tlv *) tlv;
|
||||||
|
if (tlv->length > sizeof(mgt->id))
|
||||||
mgt_pre_send(mgt);
|
mgt_pre_send(mgt);
|
||||||
mgt->id = htons(mgt->id);
|
mgt->id = htons(mgt->id);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue