verdict type: handle verdict flags and encoded additional information
PATCH 1/1 verdict type: handle verdict flags and encoded additional information
The kernel can handle this, nftables should also.
Signed-off-by Patrick McHardy <[email protected]>
--- src/datatype.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)
src/datatype.c +13 -10
@@ -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); + } } }
Signature · 1 line
1.9.3