| Summary: | ipfw swap does not swap tables between sets | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | John Zielinski <avernar> | ||||
| Component: | kern | Assignee: | Andrey V. Elsukov <ae> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | ae | ||||
| Priority: | --- | ||||||
| Version: | 11.0-RC1 | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
John Zielinski
2016-09-12 20:25:46 UTC
Created attachment 174729 [details]
Proposed patch
Hi, can you test this patch?
Tested and it works. Thank you. A commit references this bug: Author: ae Date: Tue Sep 13 18:16:16 UTC 2016 New revision: 305778 URL: https://svnweb.freebsd.org/changeset/base/305778 Log: Fix swap tables between sets when this functional is enabled. We have 6 opcode rewriters for table opcodes. When `set swap' command invoked, it is called for each rewriter, so at the end we get the same result, because opcode rewriter uses ETLV type to match opcode. And all tables opcodes have the same ETLV type. To solve this problem, use separate sets handler for one opcode rewriter. Use it to handle TEST_ALL, SWAP_ALL and MOVE_ALL commands. PR: 212630 MFC after: 1 week Changes: head/sys/netpfil/ipfw/ip_fw_table.c A commit references this bug: Author: ae Date: Tue Sep 20 13:23:09 UTC 2016 New revision: 306025 URL: https://svnweb.freebsd.org/changeset/base/306025 Log: MFC r305778: Fix swap tables between sets when this functional is enabled. We have 6 opcode rewriters for table opcodes. When `set swap' command invoked, it is called for each rewriter, so at the end we get the same result, because opcode rewriter uses ETLV type to match opcode. And all tables opcodes have the same ETLV type. To solve this problem, use separate sets handler for one opcode rewriter. Use it to handle TEST_ALL, SWAP_ALL and MOVE_ALL commands. PR: 212630 Changes: _U stable/11/ stable/11/sys/netpfil/ipfw/ip_fw_table.c Fixed in head/ and stable/11, but since 11.0-RC3 is the last planned release candidate, it will not be merged in releng/11.0. Thanks! |