Document another useful example of using @subchain
[ferm.git] / test / misc / subchain-var.ferm
blob452db9729f71e06a44f9bf30fd5f6dd27ceec3a9
1 # test expanded subchain names, substr and length
2 @def $string10 = "abcdefghij";
3 @def $string20 = "abcdefghijabcdefghij";
4 @def $twelve = 12;
6 domain ip table filter chain INPUT proto udp @subchain @substr($string20,0,$twelve) {
7     dport domain ACCEPT;
10 domain ip table filter chain INPUT proto udp @subchain @substr($string20,0,@length($string10)) {
11     dport domain ACCEPT;
14 @def $iface = "tap0";
15 domain ip table filter chain INPUT proto udp @subchain @cat("interface_", $iface) {
16     dport domain ACCEPT;