[PATCH libnetfilter_queue 1/2] src: pktb_trim() was not updating tail after updating len

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

 



skb->tail is used in many places, so it's important to keep it up to date.

Updated:

 src/extra/pktbuff.c: Fix pktb_trim()

Signed-off-by: Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx>
---
 src/extra/pktbuff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/extra/pktbuff.c b/src/extra/pktbuff.c
index 00af037..3a08d49 100644
--- a/src/extra/pktbuff.c
+++ b/src/extra/pktbuff.c
@@ -156,6 +156,7 @@ EXPORT_SYMBOL
 void pktb_trim(struct pkt_buff *pktb, unsigned int len)
 {
 	pktb->len = len;
+	pktb->tail = pktb->head + len;
 }
 
 /**
-- 
2.14.5




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux