path: root/src/extra/pktbuff.c
diff options
authorDuncan Roe <>2019-11-11 15:17:23 +1100
committerPablo Neira Ayuso <>2019-11-12 22:31:15 +0100
commite01e4fe5ac1acab58a4c0f53a66f6f1e88aea022 (patch)
treed4f1294e5f4d2634b0b9a635bc49e93d25783f1d /src/extra/pktbuff.c
parent8a4316f31fe874cc6fa9685b0d133df4d14753f0 (diff)
src: Make sure pktb_alloc() works for AF_INET6 since we document that it does
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. Updated: src/extra/pktbuff.c: Treat AF_INET6 the same as AF_INET. Signed-off-by: Duncan Roe <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/extra/pktbuff.c')
1 files changed, 1 insertions, 0 deletions
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: {