tests: osmo-pcap: fix bad UDP header calculation
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
This commit is contained in:
parent
f52b3c8b11
commit
d2de668547
|
@ -15,9 +15,7 @@
|
|||
|
||||
static int l4_udp_pkt_hdr_len(const uint8_t *pkt)
|
||||
{
|
||||
const struct udphdr *udph = (const struct udphdr *)pkt;
|
||||
|
||||
return ntohs(udph->len);
|
||||
return sizeof(struct udphdr);
|
||||
}
|
||||
|
||||
static int l4_udp_pkt_no_data(const uint8_t *pkt)
|
||||
|
|
Loading…
Reference in New Issue