* [PATCH libnetfilter_queue 0/2] Miscellaneous fixes
@ 2019-11-11 4:17 Duncan Roe
2019-11-11 4:17 ` [PATCH libnetfilter_queue 1/2] src: pktb_trim() was not updating tail after updating len Duncan Roe
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Duncan Roe @ 2019-11-11 4:17 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
I came across these while updating documentation.
So, I haven't actually exercised the code.
Duncan Roe (2):
src: pktb_trim() was not updating tail after updating len
src: Make sure pktb_alloc() works for AF_INET6 since we document that
it does
src/extra/pktbuff.c | 2 ++
1 file changed, 2 insertions(+)
--
2.14.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH libnetfilter_queue 1/2] src: pktb_trim() was not updating tail after updating len
2019-11-11 4:17 [PATCH libnetfilter_queue 0/2] Miscellaneous fixes Duncan Roe
@ 2019-11-11 4:17 ` Duncan Roe
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
2 siblings, 0 replies; 4+ messages in thread
From: Duncan Roe @ 2019-11-11 4:17 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
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>
---
| 1 +
1 file changed, 1 insertion(+)
--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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH libnetfilter_queue 2/2] src: Make sure pktb_alloc() works for AF_INET6 since we document that it does
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
2019-11-12 21:33 ` [PATCH libnetfilter_queue 0/2] Miscellaneous fixes Pablo Neira Ayuso
2 siblings, 0 replies; 4+ messages in thread
From: Duncan Roe @ 2019-11-11 4:17 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
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 <duncan_roe@optusnet.com.au>
---
| 1 +
1 file changed, 1 insertion(+)
--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;
break;
case AF_BRIDGE: {
--
2.14.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH libnetfilter_queue 0/2] Miscellaneous fixes
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 ` [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 ` Pablo Neira Ayuso
2 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2019-11-12 21:33 UTC (permalink / raw)
To: Duncan Roe; +Cc: netfilter-devel
On Mon, Nov 11, 2019 at 03:17:21PM +1100, Duncan Roe wrote:
> I came across these while updating documentation.
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-12 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).