tests: add test for deprecated rule option
authorStijn Tintel <stijn@linux-ipv6.be>
Fri, 7 Jan 2022 12:54:36 +0000 (14:54 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Sun, 9 Jan 2022 13:22:20 +0000 (15:22 +0200)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
tests/01_configuration/01_ruleset
tests/mocks/uci/firewall.json

index 9f18af42abf1cd961232448aa8dde6c49f523fad..79a1461a829be7cfa8e4590e6cd2995b5a23fb02 100644 (file)
@@ -82,6 +82,7 @@ table inet fw4 {
                oifname "lo" accept comment "!fw4: Accept traffic towards loopback"
 
                ct state established,related accept comment "!fw4: Allow outbound established and related flows"
+               meta l4proto tcp counter comment "!fw4: Test-Deprecated-Rule-Option"
                oifname "br-lan" jump output_lan comment "!fw4: Handle lan IPv4/IPv6 output traffic"
                oifname "wan" jump output_wan comment "!fw4: Handle wan IPv4/IPv6 output traffic"
        }
@@ -285,6 +286,7 @@ table inet fw4 {
 [call] fs.stat path </sys/module/nf_conntrack_tftp>
 [call] fs.stat path </sys/module/nf_conntrack_rtsp>
 [!] Section @defaults[0] specifies unknown option 'unknown_defaults_option'
+[!] Section @rule[9] (Test-Deprecated-Rule-Option) option '_name' is deprecated by fw4
 [call] fs.open path </sys/class/net/br-lan/flags> mode <r>
 [call] fs.open path </sys/class/net/br-lan/flags> mode <r>
 -- End --
index aa066c7202f5c7239e1efb97a0a91c8ff96313a0..2d97796ec4159bfc5c04c9f0bd737713a6752d44 100644 (file)
                        "dest": "lan",
                        "dest_port": "500",
                        "target": "ACCEPT"
+               },
+               {
+                       "name": "Test-Deprecated-Rule-Option",
+                       "_name": "Test-Deprecated-Rule-Option",
+                       "proto": "tcp"
                }
        ]
 }