Skip to contentSkip to conversation

mnl: fix broken sequence number allocation

PATCH New Pablo Neira Ayuso 1 participant 1 message Oct 2, 2017 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 mnl: fix broken sequence number allocation

Wrong arithmetics with pointer.

Fixes 0d9d04c31481 ("src: make netlink sequence number non-static")
---
 src/mnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/mnl.c +1 -1
index e2174925c121..808c34bf066b 100644
@@ -32,7 +32,7 @@
 
 uint32_t mnl_seqnum_alloc(unsigned int *seqnum)
 {
-	return *seqnum++;
+	return (*seqnum)++;
 }
 
 /* The largest nf_tables netlink message is the set element message, which
Signature · 1 line
2.1.4