diff options
author | Luca Deri <deri@ntop.org> | 2020-09-21 21:15:52 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-09-21 21:15:52 +0200 |
commit | 362baa6321d09d1efe50a3d86d1f2ecab896a906 (patch) | |
tree | 41e8c0e97e0188eacc38b80e7283bf5107cb937c /src/lib | |
parent | 60a9f6610d7b15c33ecd8db865cf8f7519ad0ef0 (diff) |
Minor change for alignment issue
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/protocols/stun.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c index 703b46be7..e4d504821 100644 --- a/src/lib/protocols/stun.c +++ b/src/lib/protocols/stun.c @@ -147,7 +147,6 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct * const u_int8_t * payload, const u_int16_t payload_length) { u_int16_t msg_type, msg_len; - struct stun_packet_header *h = (struct stun_packet_header*)payload; int rc; /* STUN over TCP does not look good */ @@ -178,7 +177,8 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct * goto udp_stun_found; } - msg_type = ntohs(h->msg_type), msg_len = ntohs(h->msg_len); + msg_type = ntohs(*((u_int16_t*)payload)); + msg_len = ntohs(*((u_int16_t*)&payload[2])); if(msg_type == 0) return(NDPI_IS_NOT_STUN); |