[PATCH 3/3] extra: fix wrong implementation in nfq_udp_get_payload_len

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ting-Wei Lan <lantw44@xxxxxxxxx>

---
 src/extra/udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/extra/udp.c b/src/extra/udp.c
index 2a17a2f..64d3db4 100644
--- a/src/extra/udp.c
+++ b/src/extra/udp.c
@@ -76,7 +76,7 @@ EXPORT_SYMBOL(nfq_udp_get_payload);
  */
 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);
 }
 EXPORT_SYMBOL(nfq_udp_get_payload_len);
 
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux