Skip to content

Commit 24ea1d0

Browse files
committed
icmp: fix byte order
1 parent 75bcec9 commit 24ea1d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

process/icmp.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct RecordExtICMP : public RecordExt {
8383
#ifdef WITH_NEMEA
8484
virtual void fill_unirec(ur_template_t *tmplt, void *record)
8585
{
86-
ur_set(tmplt, record, F_L4_ICMP_TYPE_CODE, type_code);
86+
ur_set(tmplt, record, F_L4_ICMP_TYPE_CODE, ntohs(type_code));
8787
}
8888

8989
const char *get_unirec_tmplt() const
@@ -100,7 +100,7 @@ struct RecordExtICMP : public RecordExt {
100100
return -1;
101101
}
102102

103-
*reinterpret_cast<uint16_t *>(buffer) = ntohs(type_code);
103+
*reinterpret_cast<uint16_t *>(buffer) = type_code;
104104

105105
return LEN;
106106
}

0 commit comments

Comments
 (0)