From 12c6c90d47b02bce68277a1f25615819dc97ef12 Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 21 Jan 2020 13:08:04 +0300 Subject: [PATCH] tpws,nfqws : fix checkpcap --- nfq/sec.c | 2 +- tpws/sec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nfq/sec.c b/nfq/sec.c index 019d2d9..d17720d 100644 --- a/nfq/sec.c +++ b/nfq/sec.c @@ -12,7 +12,7 @@ bool checkpcap(uint64_t caps) uint32_t c0 = (uint32_t)caps; uint32_t c1 = (uint32_t)(caps>>32); - return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[0].effective & c1)==c1; + return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[1].effective & c1)==c1; } bool setpcap(uint64_t caps) { diff --git a/tpws/sec.c b/tpws/sec.c index 0cf2abc..3ea792e 100644 --- a/tpws/sec.c +++ b/tpws/sec.c @@ -12,7 +12,7 @@ bool checkpcap(uint64_t caps) uint32_t c0 = (uint32_t)caps; uint32_t c1 = (uint32_t)(caps>>32); - return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[0].effective & c1)==c1; + return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[1].effective & c1)==c1; } bool setpcap(uint64_t caps) {