Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Duncan Roe <duncan_roe@optusnet.com.au>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH libnetfilter_queue 1/2] src: pktb_trim() was not updating tail after updating len
Date: Mon, 11 Nov 2019 15:17:22 +1100
Message-ID: <20191111041723.30660-2-duncan_roe@optusnet.com.au> (raw)
In-Reply-To: <20191111041723.30660-1-duncan_roe@optusnet.com.au>

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@optusnet.com.au>
---
 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


  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  4:17 [PATCH libnetfilter_queue 0/2] Miscellaneous fixes Duncan Roe
2019-11-11  4:17 ` Duncan Roe [this message]
2019-11-11  4:17 ` [PATCH libnetfilter_queue 2/2] src: Make sure pktb_alloc() works for AF_INET6 since we document that it does Duncan Roe
2019-11-12 21:33 ` [PATCH libnetfilter_queue 0/2] Miscellaneous fixes Pablo Neira Ayuso

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191111041723.30660-2-duncan_roe@optusnet.com.au \
    --to=duncan_roe@optusnet.com.au \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git