tests: osmo-pcap: fix bad UDP header calculation

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
This commit is contained in:
Pablo Neira Ayuso 2012-07-04 10:21:50 +02:00
parent f52b3c8b11
commit d2de668547
1 changed files with 1 additions and 3 deletions

View File

@ -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)