Make some protocols more "big-endian" friendly (#1402)

See #1312
This commit is contained in:
Ivan Nardi
2022-01-29 09:18:32 +01:00
committed by GitHub
parent 86b97ffb73
commit 0c70411b1b
7 changed files with 33 additions and 30 deletions
+2 -2
View File
@@ -42,9 +42,9 @@ struct stun_packet_header {
u_int32_t get_stun_lru_key(struct ndpi_packet_struct *packet, u_int8_t rev) {
if(rev)
return(packet->iph->daddr + packet->udp->dest);
return(ntohl(packet->iph->daddr) + ntohs(packet->udp->dest));
else
return(packet->iph->saddr + packet->udp->source);
return(ntohl(packet->iph->saddr) + ntohs(packet->udp->source));
}
/* ************************************************************ */