* [PATCH] verdict type: handle verdict flags and encoded additional information
@ 2014-08-18 23:37 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2014-08-18 23:37 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
The kernel can handle this, nftables should also.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
src/datatype.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/datatype.c b/src/datatype.c
index 36d5985..fdfee54 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -176,15 +176,6 @@ const struct datatype invalid_type = {
static void verdict_type_print(const struct expr *expr)
{
switch (expr->verdict) {
- case NF_ACCEPT:
- printf("accept");
- break;
- case NF_DROP:
- printf("drop");
- break;
- case NF_QUEUE:
- printf("queue");
- break;
case NFT_CONTINUE:
printf("continue");
break;
@@ -201,7 +192,19 @@ static void verdict_type_print(const struct expr *expr)
printf("return");
break;
default:
- BUG("invalid verdict value %u\n", expr->verdict);
+ switch (expr->verdict & NF_VERDICT_MASK) {
+ case NF_ACCEPT:
+ printf("accept");
+ break;
+ case NF_DROP:
+ printf("drop");
+ break;
+ case NF_QUEUE:
+ printf("queue");
+ break;
+ default:
+ BUG("invalid verdict value %u\n", expr->verdict);
+ }
}
}
--
1.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-18 23:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 23:37 [PATCH] verdict type: handle verdict flags and encoded additional information Patrick McHardy
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).