[PATCH nft] mnl: fix broken sequence number allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wrong arithmetics with pointer.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1178
Fixes: 0d9d04c31481 ("src: make netlink sequence number non-static")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/mnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mnl.c b/src/mnl.c
index e2174925c121..808c34bf066b 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -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
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux