summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan Roe <duncan_roe@optusnet.com.au>2019-12-10 10:52:55 +1100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-12-11 22:59:23 +0100
commitb09038c0577ffe1ef8fefaa26fb81259e75a218c (patch)
treeae89ed2d25dffa367e03d5bb83ed64dbcdf0c6f1
parentba386c9006ab420d82bd66404654f983f3aa30e6 (diff)
src: Fix value returned by nfq_udp_get_payload_len()HEADmaster
Remember to subtract the UDP header length. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/extra/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extra/udp.c b/src/extra/udp.c
index fed23e2..eb301f2 100644
--- a/src/extra/udp.c
+++ b/src/extra/udp.c
@@ -78,7 +78,7 @@ void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb)
EXPORT_SYMBOL
unsigned int nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb)
{
- return pktb->tail - pktb->transport_header;
+ return pktb->tail - pktb->transport_header - sizeof(struct udphdr);
}
/**