Commit 4b80ced
Florian Westphal
netfilter: nf_tables: validate all pending tables
We have to validate all tables in the transaction that are in
VALIDATE_DO state, the blamed commit below did not move the break
statement to its right location so we only validate one table.
Moreover, we can't init table->validate to _SKIP when a table object
is allocated.
If we do, then if a transcaction creates a new table and then
fails the transaction, nfnetlink will loop and nft will hang until
user cancels the command.
Add back the pernet state as a place to stash the last state encountered.
This is either _DO (we hit an error during commit validation) or _SKIP
(transaction passed all checks).
Fixes: 00c320f ("netfilter: nf_tables: make validation state per table")
Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>1 parent bfedba3 commit 4b80ced
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1729 | 1729 | | |
1730 | 1730 | | |
1731 | 1731 | | |
| 1732 | + | |
1732 | 1733 | | |
1733 | 1734 | | |
1734 | 1735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
1376 | | - | |
| 1376 | + | |
1377 | 1377 | | |
1378 | 1378 | | |
1379 | 1379 | | |
| |||
9051 | 9051 | | |
9052 | 9052 | | |
9053 | 9053 | | |
| 9054 | + | |
9054 | 9055 | | |
9055 | | - | |
9056 | | - | |
9057 | 9056 | | |
9058 | 9057 | | |
9059 | 9058 | | |
| |||
9799 | 9798 | | |
9800 | 9799 | | |
9801 | 9800 | | |
9802 | | - | |
| 9801 | + | |
| 9802 | + | |
9803 | 9803 | | |
| 9804 | + | |
9804 | 9805 | | |
9805 | 9806 | | |
9806 | 9807 | | |
| |||
10059 | 10060 | | |
10060 | 10061 | | |
10061 | 10062 | | |
| 10063 | + | |
10062 | 10064 | | |
10063 | 10065 | | |
10064 | 10066 | | |
| |||
11115 | 11117 | | |
11116 | 11118 | | |
11117 | 11119 | | |
| 11120 | + | |
11118 | 11121 | | |
11119 | 11122 | | |
11120 | 11123 | | |
| |||
0 commit comments