1
0
Fork 0

netfilter: nft_socket: Break evaluation if no socket found

Actual implementation stores 0 in the destination register if no socket
is found by the lookup, but that is not intentional as it is not really
a value of any socket metadata.

This patch fixes this and breaks rule evaluation in this case.

Fixes: 554ced0a6e ("netfilter: nf_tables: add support for native socket matching")
Signed-off-by: Máté Eckl <ecklm94@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
hifive-unleashed-5.1
Máté Eckl 2018-07-12 17:18:46 +02:00 committed by Pablo Neira Ayuso
parent 31a9c29210
commit 365b5a36f3
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ static void nft_socket_eval(const struct nft_expr *expr,
}
if (!sk) {
nft_reg_store8(dest, 0);
regs->verdict.code = NFT_BREAK;
return;
}