Netfilter-Devel Archive on
 help / color / Atom feed
From: Duncan Roe <>
Subject: [PATCH libnetfilter_queue 2/2] src: Make sure pktb_alloc() works for AF_INET6 since we document that it does
Date: Mon, 11 Nov 2019 15:17:23 +1100
Message-ID: <> (raw)
In-Reply-To: <>

Without this patch, AF_INET6 pktb_alloc() creates a pktb with NULL
network_header. But in src/extra/ipv6.c, nfq_ip6_get_hdr() assumes that
pktb->network_header is valid.


 src/extra/pktbuff.c: Treat AF_INET6 the same as AF_INET.

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

diff --git a/src/extra/pktbuff.c b/src/extra/pktbuff.c
index 3a08d49..c52b674 100644
--- a/src/extra/pktbuff.c
+++ b/src/extra/pktbuff.c
@@ -63,6 +63,7 @@ struct pkt_buff *pktb_alloc(int family, void *data, size_t len, size_t extra)
 	switch(family) {
 	case AF_INET:
+	case AF_INET6:
 		pktb->network_header = pktb->data;
 	case AF_BRIDGE: {

  parent 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 ` [PATCH libnetfilter_queue 1/2] src: pktb_trim() was not updating tail after updating len Duncan Roe
2019-11-11  4:17 ` Duncan Roe [this message]
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:

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

  git send-email \ \ \ \ \

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

Netfilter-Devel Archive on

Archives are clonable:
	git clone --mirror 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/ \
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone