Miscellaneous fixes
cover Miscellaneous fixes
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(+)
Signature · 1 line
2.14.5
PATCH 1/2 src: pktb_trim() was not updating tail after updating len
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()
--- src/extra/pktbuff.c | 1 + 1 file changed, 1 insertion(+)
src/extra/pktbuff.c +1 -0
@@ -156,6 +156,7 @@ EXPORT_SYMBOLvoid pktb_trim (struct pkt_buff *pktb,unsigned int len) { pktb->len = len; + pktb->tail = pktb->head + len; }/**
Signature · 1 line
2.14.5
PATCH 2/2 src: Make sure pktb_alloc() works for AF_INET6 since we document that it does
In reply to Duncan RoeWithout 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.
--- src/extra/pktbuff.c | 1 + 1 file changed, 1 insertion(+)
src/extra/pktbuff.c +1 -0
@@ -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 : {
Signature · 1 line
2.14.5
Quoted 1 line · Duncan Roe
I came across these while updating documentation.
Applied, thanks.