Pārlūkot izejas kodu

netfilter: nf_tables: fix tracing of the goto action

Add missing code to trace goto actions.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Pablo Neira Ayuso 11 gadi atpakaļ
vecāks
revīzija
7b9d5ef932
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      net/netfilter/nf_tables_core.c

+ 5 - 1
net/netfilter/nf_tables_core.c

@@ -171,8 +171,12 @@ next_rule:
 		jumpstack[stackptr].rule  = rule;
 		jumpstack[stackptr].rule  = rule;
 		jumpstack[stackptr].rulenum = rulenum;
 		jumpstack[stackptr].rulenum = rulenum;
 		stackptr++;
 		stackptr++;
-		/* fall through */
+		chain = data[NFT_REG_VERDICT].chain;
+		goto do_chain;
 	case NFT_GOTO:
 	case NFT_GOTO:
+		if (unlikely(pkt->skb->nf_trace))
+			nft_trace_packet(pkt, chain, rulenum, NFT_TRACE_RULE);
+
 		chain = data[NFT_REG_VERDICT].chain;
 		chain = data[NFT_REG_VERDICT].chain;
 		goto do_chain;
 		goto do_chain;
 	case NFT_RETURN:
 	case NFT_RETURN: