Commit a8ee6b9
netfilter: nf_tables: prepare for multiple elements in nft_trans_elem structure
Add helpers to release the individual elements contained in the
trans_elem container structure.
No functional change intended.
Followup patch will add 'nelems' member and will turn 'priv' into
a flexible array.
These helpers can then loop over all elements.
Care needs to be taken to handle a mix of new elements and existing
elements that are being updated (e.g. timeout refresh).
Before this patch, NEWSETELEM transaction with update is released
early so nft_trans_set_elem_destroy() won't get called, so we need
to skip elements marked as update.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>1 parent 4ee2918 commit a8ee6b9
File tree
2 files changed
+173
-76
lines changed- include/net/netfilter
- net/netfilter
2 files changed
+173
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1759 | 1759 | | |
1760 | 1760 | | |
1761 | 1761 | | |
1762 | | - | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
| 1762 | + | |
| 1763 | + | |
1766 | 1764 | | |
1767 | 1765 | | |
1768 | 1766 | | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
1769 | 1772 | | |
| 1773 | + | |
| 1774 | + | |
1770 | 1775 | | |
1771 | 1776 | | |
1772 | 1777 | | |
1773 | 1778 | | |
1774 | 1779 | | |
1775 | 1780 | | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | 1781 | | |
1785 | 1782 | | |
1786 | 1783 | | |
| |||
0 commit comments