aboutsummaryrefslogtreecommitdiffstats
path: root/tests/osmo-pcap-test
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2012-07-04 10:21:50 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2012-07-04 10:21:50 +0200
commitd2de668547f6edca982c03b85d3b0f1a194b0dbb (patch)
treef995e08d737e883df0fe30ff2c53f866f2cc081b /tests/osmo-pcap-test
parentf52b3c8b11dd30317f7084b075716d4336b0169f (diff)
tests: osmo-pcap: fix bad UDP header calculation
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
Diffstat (limited to 'tests/osmo-pcap-test')
-rw-r--r--tests/osmo-pcap-test/l4_udp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/osmo-pcap-test/l4_udp.c b/tests/osmo-pcap-test/l4_udp.c
index 0a4266e..9ffa77b 100644
--- a/tests/osmo-pcap-test/l4_udp.c
+++ b/tests/osmo-pcap-test/l4_udp.c
@@ -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)