puffy 1.0.0 → 1.1.0.pre.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -10
- data/.rubocop.yml +14 -0
- data/README.md +8 -0
- data/Rakefile +4 -0
- data/lib/puffy/cli.rb +2 -2
- data/lib/puffy/formatters/base.rb +3 -3
- data/lib/puffy/formatters/iptables.rb +35 -15
- data/lib/puffy/formatters/iptables4.rb +3 -3
- data/lib/puffy/formatters/iptables6.rb +3 -3
- data/lib/puffy/formatters/pf.rb +12 -5
- data/lib/puffy/parser.tab.rb +499 -431
- data/lib/puffy/puppet.rb +2 -2
- data/lib/puffy/resolver.rb +13 -0
- data/lib/puffy/rule.rb +1 -1
- data/lib/puffy/rule_factory.rb +2 -2
- data/lib/puffy/version.rb +1 -1
- data/puffy.gemspec +2 -2
- metadata +3 -7
data/lib/puffy/parser.tab.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
#
|
|
3
3
|
# DO NOT MODIFY!!!!
|
|
4
|
-
# This file is automatically generated by Racc 1.
|
|
4
|
+
# This file is automatically generated by Racc 1.8.1
|
|
5
5
|
# from Racc grammar file "parser.y".
|
|
6
6
|
#
|
|
7
7
|
|
|
@@ -24,7 +24,7 @@ unless $".find {|p| p.end_with?('/racc/info.rb')}
|
|
|
24
24
|
$".push "#{__dir__}/racc/info.rb"
|
|
25
25
|
|
|
26
26
|
module Racc
|
|
27
|
-
VERSION = '1.
|
|
27
|
+
VERSION = '1.8.1'
|
|
28
28
|
Version = VERSION
|
|
29
29
|
Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
|
|
30
30
|
end
|
|
@@ -32,10 +32,6 @@ end
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
unless defined?(NotImplementedError)
|
|
36
|
-
NotImplementedError = NotImplementError # :nodoc:
|
|
37
|
-
end
|
|
38
|
-
|
|
39
35
|
module Racc
|
|
40
36
|
class ParseError < StandardError; end
|
|
41
37
|
end
|
|
@@ -43,7 +39,7 @@ unless defined?(::ParseError)
|
|
|
43
39
|
ParseError = Racc::ParseError # :nodoc:
|
|
44
40
|
end
|
|
45
41
|
|
|
46
|
-
# Racc is
|
|
42
|
+
# Racc is an LALR(1) parser generator.
|
|
47
43
|
# It is written in Ruby itself, and generates Ruby programs.
|
|
48
44
|
#
|
|
49
45
|
# == Command-line Reference
|
|
@@ -660,15 +656,16 @@ end
|
|
|
660
656
|
|
|
661
657
|
require 'deep_merge'
|
|
662
658
|
require 'ipaddr'
|
|
659
|
+
require 'json'
|
|
663
660
|
require 'strscan'
|
|
664
661
|
|
|
665
662
|
module Puffy
|
|
666
663
|
class Parser < Racc::Parser
|
|
667
664
|
|
|
668
|
-
module_eval(<<'...end parser.y/module_eval...', 'parser.y',
|
|
665
|
+
module_eval(<<'...end parser.y/module_eval...', 'parser.y', 176)
|
|
669
666
|
|
|
670
667
|
attr_accessor :yydebug
|
|
671
|
-
attr_reader :
|
|
668
|
+
attr_reader :current_policies, :filename
|
|
672
669
|
#attr_accessor :variables, :nodes, :services
|
|
673
670
|
|
|
674
671
|
def ipaddress?(s)
|
|
@@ -749,6 +746,7 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 166)
|
|
|
749
746
|
when s.scan(/rdr-to\b/) then emit(:RDR_TO, s.matched)
|
|
750
747
|
when s.scan(/srv\b/) then emit(:SRV, s.matched)
|
|
751
748
|
when s.scan(/apt-mirror\b/) then emit(:APT_MIRROR, s.matched)
|
|
749
|
+
when s.scan(/azure-ip-range\b/) then emit(:AZURE_IP_RANGE, s.matched)
|
|
752
750
|
|
|
753
751
|
when s.scan(/\d+\.\d+\.\d+\.\d+(\/\d+)?/) && ip = ipaddress?(s) then emit(:ADDRESS, ip, s.matched_size)
|
|
754
752
|
when s.scan(/[[:xdigit:]]*:[:[:xdigit:]]+(\/\d+)?/) && ip = ipaddress?(s) then emit(:ADDRESS, ip, s.matched_size)
|
|
@@ -771,7 +769,7 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 166)
|
|
|
771
769
|
|
|
772
770
|
begin
|
|
773
771
|
do_parse
|
|
774
|
-
rescue Racc::ParseError
|
|
772
|
+
rescue Racc::ParseError
|
|
775
773
|
raise ParseError.new("Parse error: unexpected token: #{@current_token[0]}", @current_token[1])
|
|
776
774
|
end
|
|
777
775
|
end
|
|
@@ -805,6 +803,10 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 166)
|
|
|
805
803
|
@saved_policies = {}
|
|
806
804
|
@services = {}
|
|
807
805
|
@rule_factory = Puffy::RuleFactory.new
|
|
806
|
+
@default_policies = {
|
|
807
|
+
in: { action: :block, log: false },
|
|
808
|
+
out: { action: :block, log: false },
|
|
809
|
+
}
|
|
808
810
|
end
|
|
809
811
|
|
|
810
812
|
def nodes
|
|
@@ -851,8 +853,8 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 166)
|
|
|
851
853
|
end.flatten
|
|
852
854
|
end
|
|
853
855
|
|
|
854
|
-
def
|
|
855
|
-
prefered_value_for_hostname(@saved_policies, hostname)
|
|
856
|
+
def policies_for(hostname)
|
|
857
|
+
return @default_policies.merge(prefered_value_for_hostname(@saved_policies, hostname))
|
|
856
858
|
end
|
|
857
859
|
|
|
858
860
|
def constraint_service_to_hosts(service, hosts)
|
|
@@ -878,244 +880,259 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 166)
|
|
|
878
880
|
##### State transition tables begin ###
|
|
879
881
|
|
|
880
882
|
racc_action_table = [
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
883
|
+
36, 36, 31, 144, 93, 36, 38, 134, 135, 12,
|
|
884
|
+
36, 38, 43, 76, 77, 36, 38, 17, 23, 44,
|
|
885
|
+
24, 38, 6, 51, 52, 51, 52, 7, 127, 8,
|
|
886
|
+
178, 29, 38, 10, 40, 35, 35, 37, 41, 40,
|
|
887
|
+
35, 30, 37, 41, 40, 35, 36, 37, 41, 40,
|
|
888
|
+
35, 36, 37, 41, 124, 128, 56, 127, 129, 130,
|
|
889
|
+
40, 38, 48, 37, 41, 180, 181, 36, 127, 49,
|
|
890
|
+
167, 168, 38, 57, 152, 153, 23, 38, 24, 38,
|
|
891
|
+
160, 35, 110, 124, 128, 160, 35, 129, 130, 40,
|
|
892
|
+
38, 10, 37, 41, 124, 128, 108, 109, 129, 130,
|
|
893
|
+
40, 160, 35, 37, 41, 40, 86, 40, 37, 41,
|
|
894
|
+
37, 41, 10, 85, 19, 64, 75, 110, 40, 110,
|
|
895
|
+
20, 37, 41, 62, 63, 65, 66, 64, 79, 26,
|
|
896
|
+
27, 108, 109, 108, 109, 62, 63, 65, 66, 64,
|
|
897
|
+
21, 26, 27, 110, 23, 88, 24, 62, 63, 65,
|
|
898
|
+
66, 64, 87, 26, 27, 26, 27, 108, 109, 62,
|
|
899
|
+
63, 65, 66, 64, 19, 26, 27, 51, 52, 48,
|
|
900
|
+
20, 62, 63, 65, 66, 64, 49, 26, 27, 173,
|
|
901
|
+
80, 171, 19, 62, 63, 65, 66, 64, 20, 26,
|
|
902
|
+
27, 26, 27, 81, 19, 62, 63, 65, 66, 64,
|
|
903
|
+
20, 26, 27, 51, 52, 51, 52, 62, 63, 65,
|
|
904
|
+
66, 64, 173, 26, 27, 182, 183, 147, 148, 62,
|
|
905
|
+
63, 65, 66, 64, 95, 26, 27, 51, 52, 180,
|
|
906
|
+
181, 62, 63, 65, 66, 64, 100, 26, 27, 102,
|
|
907
|
+
75, 117, 118, 62, 63, 65, 66, 6, 6, 26,
|
|
908
|
+
27, 119, 7, 7, 8, 8, 6, 6, 10, 10,
|
|
909
|
+
120, 7, 7, 8, 8, 121, 122, 10, 10, 69,
|
|
910
|
+
70, 133, 23, 137, 24, 130, 130, 142, 143, 149,
|
|
911
|
+
155, 156, 162, 130, 165, 166, 173, 186, 187, 173,
|
|
912
|
+
189, 190 ]
|
|
909
913
|
|
|
910
914
|
racc_action_check = [
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
915
|
+
17, 130, 17, 130, 67, 31, 17, 115, 115, 1,
|
|
916
|
+
54, 31, 18, 54, 54, 77, 54, 6, 21, 18,
|
|
917
|
+
21, 77, 0, 67, 67, 115, 115, 0, 108, 0,
|
|
918
|
+
175, 11, 108, 0, 17, 17, 130, 17, 17, 31,
|
|
919
|
+
31, 12, 31, 31, 54, 54, 144, 54, 54, 77,
|
|
920
|
+
77, 168, 77, 77, 108, 108, 35, 109, 108, 108,
|
|
921
|
+
108, 109, 22, 108, 108, 175, 175, 157, 137, 22,
|
|
922
|
+
157, 157, 137, 41, 140, 140, 70, 140, 70, 127,
|
|
923
|
+
144, 144, 89, 109, 109, 168, 168, 109, 109, 109,
|
|
924
|
+
153, 48, 109, 109, 137, 137, 89, 89, 137, 137,
|
|
925
|
+
137, 157, 157, 137, 137, 140, 62, 127, 140, 140,
|
|
926
|
+
127, 127, 49, 62, 7, 43, 50, 90, 153, 91,
|
|
927
|
+
7, 153, 153, 43, 43, 43, 43, 44, 56, 43,
|
|
928
|
+
43, 90, 90, 91, 91, 44, 44, 44, 44, 59,
|
|
929
|
+
8, 44, 44, 161, 8, 63, 8, 59, 59, 59,
|
|
930
|
+
59, 60, 63, 59, 59, 10, 10, 161, 161, 60,
|
|
931
|
+
60, 60, 60, 61, 64, 60, 60, 25, 25, 69,
|
|
932
|
+
64, 61, 61, 61, 61, 72, 69, 61, 61, 162,
|
|
933
|
+
57, 162, 65, 72, 72, 72, 72, 73, 65, 72,
|
|
934
|
+
72, 29, 29, 58, 66, 73, 73, 73, 73, 85,
|
|
935
|
+
66, 73, 73, 53, 53, 93, 93, 85, 85, 85,
|
|
936
|
+
85, 86, 176, 85, 85, 176, 176, 132, 132, 86,
|
|
937
|
+
86, 86, 86, 87, 68, 86, 86, 135, 135, 178,
|
|
938
|
+
178, 87, 87, 87, 87, 88, 74, 87, 87, 80,
|
|
939
|
+
92, 98, 99, 88, 88, 88, 88, 2, 3, 88,
|
|
940
|
+
88, 103, 2, 3, 2, 3, 4, 5, 2, 3,
|
|
941
|
+
104, 4, 5, 4, 5, 105, 106, 4, 5, 45,
|
|
942
|
+
45, 114, 45, 123, 45, 124, 126, 128, 129, 133,
|
|
943
|
+
142, 143, 146, 152, 155, 156, 171, 180, 181, 183,
|
|
944
|
+
186, 189 ]
|
|
939
945
|
|
|
940
946
|
racc_action_pointer = [
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
nil, nil, nil, nil,
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
nil, nil, nil,
|
|
952
|
-
|
|
953
|
-
nil,
|
|
954
|
-
|
|
955
|
-
nil,
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
947
|
+
20, 9, 245, 246, 254, 255, 14, 112, 136, nil,
|
|
948
|
+
134, 18, 41, nil, nil, nil, nil, -2, 8, nil,
|
|
949
|
+
nil, 10, 58, nil, nil, 144, nil, nil, nil, 170,
|
|
950
|
+
nil, 3, nil, nil, nil, 18, nil, nil, nil, nil,
|
|
951
|
+
nil, 41, nil, 108, 120, 264, nil, nil, 78, 99,
|
|
952
|
+
97, nil, nil, 180, 8, nil, 91, 172, 188, 132,
|
|
953
|
+
144, 156, 102, 141, 162, 180, 192, 0, 212, 165,
|
|
954
|
+
68, nil, 168, 180, 222, nil, nil, 13, nil, nil,
|
|
955
|
+
206, nil, nil, nil, nil, 192, 204, 216, 228, 68,
|
|
956
|
+
103, 105, 221, 182, nil, nil, nil, nil, 236, 230,
|
|
957
|
+
nil, nil, nil, 239, 255, 253, 261, nil, 24, 53,
|
|
958
|
+
nil, nil, nil, nil, 251, 2, nil, nil, nil, nil,
|
|
959
|
+
nil, nil, nil, 244, 240, nil, 241, 71, 245, 246,
|
|
960
|
+
-1, nil, 192, 271, nil, 204, nil, 64, nil, nil,
|
|
961
|
+
69, nil, 272, 273, 44, nil, 255, nil, nil, nil,
|
|
962
|
+
nil, nil, 248, 82, nil, 251, 252, 65, nil, nil,
|
|
963
|
+
nil, 129, 177, nil, nil, nil, nil, nil, 49, nil,
|
|
964
|
+
nil, 284, nil, nil, nil, 24, 210, nil, 188, nil,
|
|
965
|
+
248, 249, nil, 287, nil, nil, 255, nil, nil, 254,
|
|
966
|
+
nil ]
|
|
959
967
|
|
|
960
968
|
racc_action_default = [
|
|
961
|
-
-5, -
|
|
962
|
-
-
|
|
963
|
-
-
|
|
964
|
-
-
|
|
965
|
-
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
-
|
|
971
|
-
-
|
|
972
|
-
|
|
973
|
-
-
|
|
974
|
-
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
-
|
|
978
|
-
-
|
|
969
|
+
-5, -105, -5, -5, -5, -5, -105, -105, -105, -31,
|
|
970
|
+
-105, -34, -105, -1, -2, -3, -4, -105, -105, -14,
|
|
971
|
+
-15, -105, -105, -21, -22, -32, -48, -49, -33, -105,
|
|
972
|
+
191, -105, -7, -11, -12, -88, -89, -91, -92, -96,
|
|
973
|
+
-97, -105, -13, -30, -30, -105, -20, -17, -34, -34,
|
|
974
|
+
-45, -56, -57, -105, -105, -10, -105, -105, -105, -30,
|
|
975
|
+
-30, -30, -105, -105, -105, -105, -105, -50, -105, -105,
|
|
976
|
+
-105, -19, -30, -30, -105, -44, -6, -105, -9, -90,
|
|
977
|
+
-105, -25, -27, -28, -29, -30, -30, -30, -30, -73,
|
|
978
|
+
-73, -73, -45, -105, -52, -26, -16, -18, -105, -105,
|
|
979
|
+
-35, -8, -98, -105, -105, -105, -105, -40, -82, -82,
|
|
980
|
+
-71, -72, -41, -42, -46, -105, -55, -23, -24, -36,
|
|
981
|
+
-37, -38, -39, -69, -82, -75, -82, -105, -105, -105,
|
|
982
|
+
-105, -70, -58, -105, -51, -105, -54, -82, -74, -76,
|
|
983
|
+
-105, -95, -105, -105, -105, -81, -61, -59, -60, -47,
|
|
984
|
+
-53, -68, -82, -105, -94, -105, -105, -105, -85, -86,
|
|
985
|
+
-87, -105, -105, -77, -93, -78, -79, -80, -105, -84,
|
|
986
|
+
-101, -105, -63, -67, -83, -43, -105, -66, -105, -100,
|
|
987
|
+
-105, -105, -62, -105, -65, -99, -103, -104, -64, -105,
|
|
988
|
+
-102 ]
|
|
979
989
|
|
|
980
990
|
racc_goto_table = [
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
991
|
+
94, 22, 32, 47, 126, 126, 25, 18, 145, 74,
|
|
992
|
+
179, 58, 68, 185, 46, 138, 55, 139, 123, 131,
|
|
993
|
+
54, 158, 159, 141, 42, 53, 116, 82, 83, 84,
|
|
994
|
+
107, 112, 113, 126, 169, 159, 154, 45, 71, 78,
|
|
995
|
+
98, 99, 28, 163, 92, 174, 159, 151, 136, 164,
|
|
996
|
+
96, 114, 132, 103, 104, 105, 106, 146, 172, 72,
|
|
997
|
+
73, 161, 101, 97, 89, 90, 91, 177, 150, 170,
|
|
998
|
+
175, 1, 184, 13, 14, 15, 16, 115, 176, 188,
|
|
999
|
+
140, 157 ]
|
|
990
1000
|
|
|
991
1001
|
racc_goto_check = [
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1002
|
+
22, 14, 7, 13, 8, 8, 20, 10, 9, 23,
|
|
1003
|
+
40, 15, 15, 40, 14, 35, 7, 35, 34, 34,
|
|
1004
|
+
6, 38, 9, 8, 11, 20, 22, 15, 15, 15,
|
|
1005
|
+
24, 24, 24, 8, 38, 9, 8, 12, 14, 7,
|
|
1006
|
+
15, 15, 19, 35, 25, 38, 9, 34, 22, 8,
|
|
1007
|
+
13, 23, 26, 15, 15, 15, 15, 27, 33, 4,
|
|
1008
|
+
4, 28, 7, 14, 10, 10, 10, 33, 22, 29,
|
|
1009
|
+
30, 1, 33, 1, 1, 1, 1, 31, 32, 33,
|
|
1010
|
+
36, 37 ]
|
|
1001
1011
|
|
|
1002
1012
|
racc_goto_pointer = [
|
|
1003
|
-
nil,
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
-
|
|
1013
|
+
nil, 71, nil, nil, 11, nil, -11, -15, -104, -122,
|
|
1014
|
+
0, 6, 16, -19, -7, -32, nil, nil, nil, 31,
|
|
1015
|
+
-4, nil, -67, -41, -59, -23, -62, -75, -85, -92,
|
|
1016
|
+
-100, -16, -93, -104, -90, -109, -47, -63, -123, nil,
|
|
1017
|
+
-165 ]
|
|
1007
1018
|
|
|
1008
1019
|
racc_goto_default = [
|
|
1009
|
-
nil, nil, 2, 3, 4, 5, nil, nil,
|
|
1010
|
-
nil, nil, nil,
|
|
1011
|
-
|
|
1012
|
-
nil,
|
|
1020
|
+
nil, nil, 2, 3, 4, 5, nil, nil, 33, 34,
|
|
1021
|
+
nil, nil, nil, nil, nil, nil, 59, 60, 61, 9,
|
|
1022
|
+
67, 11, 50, nil, nil, nil, nil, nil, nil, 111,
|
|
1023
|
+
nil, nil, nil, nil, nil, 125, nil, nil, nil, 39,
|
|
1024
|
+
nil ]
|
|
1013
1025
|
|
|
1014
1026
|
racc_reduce_table = [
|
|
1015
1027
|
0, 0, :racc_error,
|
|
1016
|
-
2,
|
|
1017
|
-
2,
|
|
1018
|
-
2,
|
|
1019
|
-
2,
|
|
1020
|
-
0,
|
|
1021
|
-
5,
|
|
1022
|
-
3,
|
|
1023
|
-
3,
|
|
1024
|
-
2,
|
|
1025
|
-
1,
|
|
1026
|
-
1,
|
|
1027
|
-
1,
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
1,
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
3,
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
1,
|
|
1037
|
-
1,
|
|
1038
|
-
|
|
1039
|
-
4,
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
2,
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
2,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
4,
|
|
1052
|
-
4,
|
|
1053
|
-
4,
|
|
1054
|
-
|
|
1055
|
-
3,
|
|
1056
|
-
3,
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
0,
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
1,
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
1,
|
|
1071
|
-
1,
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
1,
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
1,
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
2,
|
|
1085
|
-
|
|
1086
|
-
1,
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
2,
|
|
1090
|
-
1,
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
4,
|
|
1094
|
-
4,
|
|
1095
|
-
4,
|
|
1096
|
-
2,
|
|
1097
|
-
0,
|
|
1098
|
-
3,
|
|
1099
|
-
2,
|
|
1100
|
-
1,
|
|
1101
|
-
1,
|
|
1102
|
-
1,
|
|
1103
|
-
|
|
1104
|
-
1,
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1028
|
+
2, 44, :_reduce_none,
|
|
1029
|
+
2, 44, :_reduce_none,
|
|
1030
|
+
2, 44, :_reduce_3,
|
|
1031
|
+
2, 44, :_reduce_none,
|
|
1032
|
+
0, 44, :_reduce_none,
|
|
1033
|
+
5, 45, :_reduce_6,
|
|
1034
|
+
3, 45, :_reduce_7,
|
|
1035
|
+
3, 49, :_reduce_8,
|
|
1036
|
+
2, 49, :_reduce_9,
|
|
1037
|
+
1, 49, :_reduce_10,
|
|
1038
|
+
1, 50, :_reduce_11,
|
|
1039
|
+
1, 50, :_reduce_12,
|
|
1040
|
+
3, 48, :_reduce_13,
|
|
1041
|
+
1, 53, :_reduce_14,
|
|
1042
|
+
1, 53, :_reduce_15,
|
|
1043
|
+
5, 46, :_reduce_16,
|
|
1044
|
+
3, 46, :_reduce_17,
|
|
1045
|
+
3, 55, :_reduce_18,
|
|
1046
|
+
2, 55, :_reduce_19,
|
|
1047
|
+
1, 55, :_reduce_20,
|
|
1048
|
+
1, 57, :_reduce_21,
|
|
1049
|
+
1, 57, :_reduce_22,
|
|
1050
|
+
4, 56, :_reduce_23,
|
|
1051
|
+
4, 56, :_reduce_24,
|
|
1052
|
+
3, 54, :_reduce_25,
|
|
1053
|
+
3, 54, :_reduce_26,
|
|
1054
|
+
2, 58, :_reduce_27,
|
|
1055
|
+
2, 58, :_reduce_28,
|
|
1056
|
+
2, 58, :_reduce_29,
|
|
1057
|
+
0, 58, :_reduce_30,
|
|
1058
|
+
1, 47, :_reduce_31,
|
|
1059
|
+
2, 47, :_reduce_32,
|
|
1060
|
+
2, 62, :_reduce_33,
|
|
1061
|
+
0, 62, :_reduce_34,
|
|
1062
|
+
5, 64, :_reduce_35,
|
|
1063
|
+
4, 60, :_reduce_36,
|
|
1064
|
+
4, 60, :_reduce_37,
|
|
1065
|
+
4, 61, :_reduce_38,
|
|
1066
|
+
4, 61, :_reduce_39,
|
|
1067
|
+
3, 59, :_reduce_40,
|
|
1068
|
+
3, 59, :_reduce_41,
|
|
1069
|
+
3, 59, :_reduce_42,
|
|
1070
|
+
8, 59, :_reduce_43,
|
|
1071
|
+
1, 66, :_reduce_44,
|
|
1072
|
+
0, 66, :_reduce_45,
|
|
1073
|
+
0, 69, :_reduce_none,
|
|
1074
|
+
2, 69, :_reduce_47,
|
|
1075
|
+
1, 63, :_reduce_48,
|
|
1076
|
+
1, 63, :_reduce_49,
|
|
1077
|
+
0, 68, :_reduce_none,
|
|
1078
|
+
3, 68, :_reduce_51,
|
|
1079
|
+
1, 68, :_reduce_52,
|
|
1080
|
+
3, 74, :_reduce_53,
|
|
1081
|
+
2, 74, :_reduce_54,
|
|
1082
|
+
1, 74, :_reduce_55,
|
|
1083
|
+
1, 65, :_reduce_56,
|
|
1084
|
+
1, 65, :_reduce_57,
|
|
1085
|
+
0, 70, :_reduce_none,
|
|
1086
|
+
1, 70, :_reduce_59,
|
|
1087
|
+
1, 70, :_reduce_60,
|
|
1088
|
+
0, 71, :_reduce_none,
|
|
1089
|
+
4, 71, :_reduce_62,
|
|
1090
|
+
2, 71, :_reduce_63,
|
|
1091
|
+
3, 75, :_reduce_64,
|
|
1092
|
+
2, 75, :_reduce_65,
|
|
1093
|
+
1, 75, :_reduce_66,
|
|
1094
|
+
1, 76, :_reduce_67,
|
|
1095
|
+
4, 72, :_reduce_68,
|
|
1096
|
+
2, 72, :_reduce_69,
|
|
1097
|
+
2, 72, :_reduce_70,
|
|
1098
|
+
1, 72, :_reduce_71,
|
|
1099
|
+
1, 67, :_reduce_none,
|
|
1100
|
+
0, 67, :_reduce_73,
|
|
1101
|
+
2, 77, :_reduce_74,
|
|
1102
|
+
1, 77, :_reduce_75,
|
|
1103
|
+
2, 77, :_reduce_76,
|
|
1104
|
+
4, 77, :_reduce_77,
|
|
1105
|
+
4, 77, :_reduce_78,
|
|
1106
|
+
4, 77, :_reduce_79,
|
|
1107
|
+
4, 78, :_reduce_80,
|
|
1108
|
+
2, 78, :_reduce_81,
|
|
1109
|
+
0, 78, :_reduce_none,
|
|
1110
|
+
3, 80, :_reduce_83,
|
|
1111
|
+
2, 80, :_reduce_84,
|
|
1112
|
+
1, 80, :_reduce_85,
|
|
1113
|
+
1, 81, :_reduce_86,
|
|
1114
|
+
1, 81, :_reduce_87,
|
|
1115
|
+
1, 52, :_reduce_88,
|
|
1116
|
+
1, 52, :_reduce_89,
|
|
1117
|
+
3, 52, :_reduce_90,
|
|
1118
|
+
1, 82, :_reduce_91,
|
|
1119
|
+
1, 82, :_reduce_92,
|
|
1120
|
+
3, 79, :_reduce_93,
|
|
1121
|
+
2, 79, :_reduce_94,
|
|
1122
|
+
1, 79, :_reduce_95,
|
|
1123
|
+
1, 51, :_reduce_96,
|
|
1124
|
+
1, 51, :_reduce_97,
|
|
1125
|
+
4, 51, :_reduce_98,
|
|
1126
|
+
3, 73, :_reduce_99,
|
|
1127
|
+
2, 73, :_reduce_100,
|
|
1128
|
+
0, 73, :_reduce_101,
|
|
1129
|
+
4, 83, :_reduce_102,
|
|
1130
|
+
2, 83, :_reduce_103,
|
|
1131
|
+
2, 83, :_reduce_104 ]
|
|
1132
|
+
|
|
1133
|
+
racc_reduce_n = 105
|
|
1134
|
+
|
|
1135
|
+
racc_shift_n = 191
|
|
1119
1136
|
|
|
1120
1137
|
racc_token_table = {
|
|
1121
1138
|
false => 0,
|
|
@@ -1125,43 +1142,44 @@ racc_token_table = {
|
|
|
1125
1142
|
"{" => 4,
|
|
1126
1143
|
"}" => 5,
|
|
1127
1144
|
"," => 6,
|
|
1128
|
-
:
|
|
1145
|
+
:SERVICE => 7,
|
|
1129
1146
|
:STRING => 8,
|
|
1130
|
-
:
|
|
1131
|
-
:
|
|
1132
|
-
:
|
|
1133
|
-
:
|
|
1134
|
-
:
|
|
1135
|
-
:
|
|
1136
|
-
:
|
|
1137
|
-
:
|
|
1138
|
-
:
|
|
1139
|
-
:
|
|
1140
|
-
:
|
|
1141
|
-
:
|
|
1142
|
-
:
|
|
1143
|
-
:
|
|
1144
|
-
:
|
|
1145
|
-
:
|
|
1146
|
-
:
|
|
1147
|
-
:
|
|
1148
|
-
:
|
|
1149
|
-
:
|
|
1150
|
-
:
|
|
1151
|
-
:
|
|
1152
|
-
:
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
:
|
|
1158
|
-
:
|
|
1159
|
-
:
|
|
1160
|
-
|
|
1161
|
-
:
|
|
1162
|
-
:
|
|
1163
|
-
|
|
1164
|
-
|
|
1147
|
+
:NODE => 9,
|
|
1148
|
+
:REGEX => 10,
|
|
1149
|
+
:DO => 11,
|
|
1150
|
+
:END => 12,
|
|
1151
|
+
:POLICY => 13,
|
|
1152
|
+
:ALL => 14,
|
|
1153
|
+
:IPV4 => 15,
|
|
1154
|
+
:IPV6 => 16,
|
|
1155
|
+
:CLIENT => 17,
|
|
1156
|
+
:SERVER => 18,
|
|
1157
|
+
:LOG => 19,
|
|
1158
|
+
:ON => 20,
|
|
1159
|
+
:BLOCK => 21,
|
|
1160
|
+
:PASS => 22,
|
|
1161
|
+
:IN => 23,
|
|
1162
|
+
:OUT => 24,
|
|
1163
|
+
:INET => 25,
|
|
1164
|
+
:INET6 => 26,
|
|
1165
|
+
:PROTO => 27,
|
|
1166
|
+
:FROM => 28,
|
|
1167
|
+
:TO => 29,
|
|
1168
|
+
:ANY => 30,
|
|
1169
|
+
:SRV => 31,
|
|
1170
|
+
"(" => 32,
|
|
1171
|
+
")" => 33,
|
|
1172
|
+
:APT_MIRROR => 34,
|
|
1173
|
+
:PORT => 35,
|
|
1174
|
+
:VARIABLE => 36,
|
|
1175
|
+
:INTEGER => 37,
|
|
1176
|
+
":" => 38,
|
|
1177
|
+
:ADDRESS => 39,
|
|
1178
|
+
:AZURE_IP_RANGE => 40,
|
|
1179
|
+
:RDR_TO => 41,
|
|
1180
|
+
:NAT_TO => 42 }
|
|
1181
|
+
|
|
1182
|
+
racc_nt_base = 43
|
|
1165
1183
|
|
|
1166
1184
|
racc_use_result_var = true
|
|
1167
1185
|
|
|
@@ -1190,20 +1208,19 @@ Racc_token_to_s_table = [
|
|
|
1190
1208
|
"\"{\"",
|
|
1191
1209
|
"\"}\"",
|
|
1192
1210
|
"\",\"",
|
|
1193
|
-
"ADDRESS",
|
|
1194
|
-
"STRING",
|
|
1195
|
-
"VARIABLE",
|
|
1196
1211
|
"SERVICE",
|
|
1212
|
+
"STRING",
|
|
1197
1213
|
"NODE",
|
|
1198
1214
|
"REGEX",
|
|
1199
1215
|
"DO",
|
|
1200
1216
|
"END",
|
|
1201
1217
|
"POLICY",
|
|
1202
|
-
"
|
|
1218
|
+
"ALL",
|
|
1203
1219
|
"IPV4",
|
|
1204
1220
|
"IPV6",
|
|
1205
1221
|
"CLIENT",
|
|
1206
1222
|
"SERVER",
|
|
1223
|
+
"LOG",
|
|
1207
1224
|
"ON",
|
|
1208
1225
|
"BLOCK",
|
|
1209
1226
|
"PASS",
|
|
@@ -1214,53 +1231,59 @@ Racc_token_to_s_table = [
|
|
|
1214
1231
|
"PROTO",
|
|
1215
1232
|
"FROM",
|
|
1216
1233
|
"TO",
|
|
1217
|
-
"ALL",
|
|
1218
1234
|
"ANY",
|
|
1219
1235
|
"SRV",
|
|
1220
1236
|
"\"(\"",
|
|
1221
1237
|
"\")\"",
|
|
1222
1238
|
"APT_MIRROR",
|
|
1223
1239
|
"PORT",
|
|
1240
|
+
"VARIABLE",
|
|
1224
1241
|
"INTEGER",
|
|
1225
1242
|
"\":\"",
|
|
1243
|
+
"ADDRESS",
|
|
1244
|
+
"AZURE_IP_RANGE",
|
|
1226
1245
|
"RDR_TO",
|
|
1227
1246
|
"NAT_TO",
|
|
1228
1247
|
"$start",
|
|
1229
1248
|
"target",
|
|
1230
1249
|
"assignation",
|
|
1231
1250
|
"node",
|
|
1232
|
-
"
|
|
1251
|
+
"policies",
|
|
1233
1252
|
"service",
|
|
1234
1253
|
"variable_value_list",
|
|
1235
1254
|
"variable_value",
|
|
1255
|
+
"host_list_item",
|
|
1256
|
+
"port",
|
|
1236
1257
|
"service_name",
|
|
1237
1258
|
"block",
|
|
1238
1259
|
"node_name_list",
|
|
1239
|
-
"
|
|
1260
|
+
"block_with_policies",
|
|
1240
1261
|
"node_name",
|
|
1241
1262
|
"rules",
|
|
1242
1263
|
"pf_rule",
|
|
1243
1264
|
"ipv4_block",
|
|
1244
1265
|
"ipv6_block",
|
|
1266
|
+
"policy_list",
|
|
1245
1267
|
"action",
|
|
1268
|
+
"policy",
|
|
1269
|
+
"direction",
|
|
1270
|
+
"log",
|
|
1246
1271
|
"optional_hosts",
|
|
1247
1272
|
"rule_direction",
|
|
1248
|
-
"log",
|
|
1249
1273
|
"on_interface",
|
|
1250
1274
|
"rule_af",
|
|
1251
1275
|
"protospec",
|
|
1252
1276
|
"hosts",
|
|
1253
1277
|
"filteropts",
|
|
1254
1278
|
"direction_list",
|
|
1255
|
-
"direction",
|
|
1256
1279
|
"protocol_list",
|
|
1257
1280
|
"protocol",
|
|
1258
1281
|
"hosts_host",
|
|
1259
1282
|
"hosts_port",
|
|
1260
|
-
"host",
|
|
1261
1283
|
"host_list",
|
|
1262
1284
|
"port_list",
|
|
1263
|
-
"
|
|
1285
|
+
"port_list_item",
|
|
1286
|
+
"host",
|
|
1264
1287
|
"filteropt" ]
|
|
1265
1288
|
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
|
1266
1289
|
|
|
@@ -1276,7 +1299,7 @@ Racc_debug_parser = false
|
|
|
1276
1299
|
|
|
1277
1300
|
module_eval(<<'.,.,', 'parser.y', 4)
|
|
1278
1301
|
def _reduce_3(val, _values, result)
|
|
1279
|
-
@
|
|
1302
|
+
@default_policies = val[0]
|
|
1280
1303
|
result
|
|
1281
1304
|
end
|
|
1282
1305
|
.,.,
|
|
@@ -1322,28 +1345,28 @@ module_eval(<<'.,.,', 'parser.y', 13)
|
|
|
1322
1345
|
|
|
1323
1346
|
module_eval(<<'.,.,', 'parser.y', 15)
|
|
1324
1347
|
def _reduce_11(val, _values, result)
|
|
1325
|
-
result = val[0]
|
|
1348
|
+
result = val[0]
|
|
1326
1349
|
result
|
|
1327
1350
|
end
|
|
1328
1351
|
.,.,
|
|
1329
1352
|
|
|
1330
1353
|
module_eval(<<'.,.,', 'parser.y', 16)
|
|
1331
1354
|
def _reduce_12(val, _values, result)
|
|
1332
|
-
result = val[0]
|
|
1355
|
+
result = val[0]
|
|
1333
1356
|
result
|
|
1334
1357
|
end
|
|
1335
1358
|
.,.,
|
|
1336
1359
|
|
|
1337
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1360
|
+
module_eval(<<'.,.,', 'parser.y', 18)
|
|
1338
1361
|
def _reduce_13(val, _values, result)
|
|
1339
|
-
|
|
1362
|
+
@services[val[1]] = val[2]
|
|
1340
1363
|
result
|
|
1341
1364
|
end
|
|
1342
1365
|
.,.,
|
|
1343
1366
|
|
|
1344
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1367
|
+
module_eval(<<'.,.,', 'parser.y', 20)
|
|
1345
1368
|
def _reduce_14(val, _values, result)
|
|
1346
|
-
|
|
1369
|
+
result = val[0][:value]
|
|
1347
1370
|
result
|
|
1348
1371
|
end
|
|
1349
1372
|
.,.,
|
|
@@ -1355,44 +1378,44 @@ module_eval(<<'.,.,', 'parser.y', 21)
|
|
|
1355
1378
|
end
|
|
1356
1379
|
.,.,
|
|
1357
1380
|
|
|
1358
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1381
|
+
module_eval(<<'.,.,', 'parser.y', 23)
|
|
1359
1382
|
def _reduce_16(val, _values, result)
|
|
1360
|
-
|
|
1383
|
+
val[2].each { |name| @nodes[name] = val[4]; @saved_policies[name] = @current_policies }
|
|
1361
1384
|
result
|
|
1362
1385
|
end
|
|
1363
1386
|
.,.,
|
|
1364
1387
|
|
|
1365
1388
|
module_eval(<<'.,.,', 'parser.y', 24)
|
|
1366
1389
|
def _reduce_17(val, _values, result)
|
|
1367
|
-
|
|
1390
|
+
@nodes[val[1]] = val[2]; @saved_policies[val[1]] = @current_policies
|
|
1368
1391
|
result
|
|
1369
1392
|
end
|
|
1370
1393
|
.,.,
|
|
1371
1394
|
|
|
1372
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1395
|
+
module_eval(<<'.,.,', 'parser.y', 26)
|
|
1373
1396
|
def _reduce_18(val, _values, result)
|
|
1374
|
-
|
|
1397
|
+
result = val[0] + [val[2]]
|
|
1375
1398
|
result
|
|
1376
1399
|
end
|
|
1377
1400
|
.,.,
|
|
1378
1401
|
|
|
1379
1402
|
module_eval(<<'.,.,', 'parser.y', 27)
|
|
1380
1403
|
def _reduce_19(val, _values, result)
|
|
1381
|
-
result = val[0] + [val[
|
|
1404
|
+
result = val[0] + [val[1]]
|
|
1382
1405
|
result
|
|
1383
1406
|
end
|
|
1384
1407
|
.,.,
|
|
1385
1408
|
|
|
1386
1409
|
module_eval(<<'.,.,', 'parser.y', 28)
|
|
1387
1410
|
def _reduce_20(val, _values, result)
|
|
1388
|
-
result = val[0]
|
|
1411
|
+
result = [val[0]]
|
|
1389
1412
|
result
|
|
1390
1413
|
end
|
|
1391
1414
|
.,.,
|
|
1392
1415
|
|
|
1393
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1416
|
+
module_eval(<<'.,.,', 'parser.y', 30)
|
|
1394
1417
|
def _reduce_21(val, _values, result)
|
|
1395
|
-
result =
|
|
1418
|
+
result = val[0][:value]
|
|
1396
1419
|
result
|
|
1397
1420
|
end
|
|
1398
1421
|
.,.,
|
|
@@ -1404,44 +1427,44 @@ module_eval(<<'.,.,', 'parser.y', 31)
|
|
|
1404
1427
|
end
|
|
1405
1428
|
.,.,
|
|
1406
1429
|
|
|
1407
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1430
|
+
module_eval(<<'.,.,', 'parser.y', 33)
|
|
1408
1431
|
def _reduce_23(val, _values, result)
|
|
1409
|
-
|
|
1432
|
+
@current_policies = val[1]; result = val[2]
|
|
1410
1433
|
result
|
|
1411
1434
|
end
|
|
1412
1435
|
.,.,
|
|
1413
1436
|
|
|
1414
1437
|
module_eval(<<'.,.,', 'parser.y', 34)
|
|
1415
1438
|
def _reduce_24(val, _values, result)
|
|
1416
|
-
@
|
|
1439
|
+
@current_policies = val[1]; result = val[2]
|
|
1417
1440
|
result
|
|
1418
1441
|
end
|
|
1419
1442
|
.,.,
|
|
1420
1443
|
|
|
1421
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1444
|
+
module_eval(<<'.,.,', 'parser.y', 36)
|
|
1422
1445
|
def _reduce_25(val, _values, result)
|
|
1423
|
-
|
|
1446
|
+
result = val[1].freeze
|
|
1424
1447
|
result
|
|
1425
1448
|
end
|
|
1426
1449
|
.,.,
|
|
1427
1450
|
|
|
1428
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1451
|
+
module_eval(<<'.,.,', 'parser.y', 37)
|
|
1429
1452
|
def _reduce_26(val, _values, result)
|
|
1430
|
-
|
|
1453
|
+
result = val[1].freeze
|
|
1431
1454
|
result
|
|
1432
1455
|
end
|
|
1433
1456
|
.,.,
|
|
1434
1457
|
|
|
1435
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1458
|
+
module_eval(<<'.,.,', 'parser.y', 39)
|
|
1436
1459
|
def _reduce_27(val, _values, result)
|
|
1437
|
-
result = val[1]
|
|
1460
|
+
result = val[0] + val[1]
|
|
1438
1461
|
result
|
|
1439
1462
|
end
|
|
1440
1463
|
.,.,
|
|
1441
1464
|
|
|
1442
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1465
|
+
module_eval(<<'.,.,', 'parser.y', 40)
|
|
1443
1466
|
def _reduce_28(val, _values, result)
|
|
1444
|
-
result = val[1]
|
|
1467
|
+
result = val[0] + val[1]
|
|
1445
1468
|
result
|
|
1446
1469
|
end
|
|
1447
1470
|
.,.,
|
|
@@ -1455,61 +1478,61 @@ module_eval(<<'.,.,', 'parser.y', 41)
|
|
|
1455
1478
|
|
|
1456
1479
|
module_eval(<<'.,.,', 'parser.y', 42)
|
|
1457
1480
|
def _reduce_30(val, _values, result)
|
|
1458
|
-
result =
|
|
1481
|
+
result = []
|
|
1459
1482
|
result
|
|
1460
1483
|
end
|
|
1461
1484
|
.,.,
|
|
1462
1485
|
|
|
1463
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1486
|
+
module_eval(<<'.,.,', 'parser.y', 44)
|
|
1464
1487
|
def _reduce_31(val, _values, result)
|
|
1465
|
-
result = val[0]
|
|
1488
|
+
result = val[0]
|
|
1466
1489
|
result
|
|
1467
1490
|
end
|
|
1468
1491
|
.,.,
|
|
1469
1492
|
|
|
1470
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1493
|
+
module_eval(<<'.,.,', 'parser.y', 45)
|
|
1471
1494
|
def _reduce_32(val, _values, result)
|
|
1472
|
-
result = []
|
|
1495
|
+
warn("#{val[0][:filename]}:#{val[0][:lineno]}:#{val[0][:position]}: deprecated policy syntax:\n\t#{val[0][:line]}\n\t#{' ' * val[0][:position]}^#{'~' * (val[0][:line].length - 1 - val[0][:position])}\n\tUse explicit 'in' and 'out' policies, with optional logging:\n\tpolicy #{val[1][:action]} in all\n\tpolicy #{val[1][:action]} out all") ; result = { in: { action: val[1][:action] }, out: { action: val[1][:action] } }
|
|
1473
1496
|
result
|
|
1474
1497
|
end
|
|
1475
1498
|
.,.,
|
|
1476
1499
|
|
|
1477
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1500
|
+
module_eval(<<'.,.,', 'parser.y', 47)
|
|
1478
1501
|
def _reduce_33(val, _values, result)
|
|
1479
|
-
result = val[1][:
|
|
1502
|
+
result = val[1].merge(val[0][:dir] => val[0])
|
|
1480
1503
|
result
|
|
1481
1504
|
end
|
|
1482
1505
|
.,.,
|
|
1483
1506
|
|
|
1484
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1507
|
+
module_eval(<<'.,.,', 'parser.y', 48)
|
|
1485
1508
|
def _reduce_34(val, _values, result)
|
|
1486
|
-
result =
|
|
1509
|
+
result = {}
|
|
1487
1510
|
result
|
|
1488
1511
|
end
|
|
1489
1512
|
.,.,
|
|
1490
1513
|
|
|
1491
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1514
|
+
module_eval(<<'.,.,', 'parser.y', 50)
|
|
1492
1515
|
def _reduce_35(val, _values, result)
|
|
1493
|
-
result =
|
|
1516
|
+
result = { action: val[1][:action], dir: val[2], log: val[3].any? }
|
|
1494
1517
|
result
|
|
1495
1518
|
end
|
|
1496
1519
|
.,.,
|
|
1497
1520
|
|
|
1498
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1521
|
+
module_eval(<<'.,.,', 'parser.y', 52)
|
|
1499
1522
|
def _reduce_36(val, _values, result)
|
|
1500
1523
|
result = val[2].reject { |x| x[:af] == :inet6 }.map { |x| x[:af] = :inet ; x }
|
|
1501
1524
|
result
|
|
1502
1525
|
end
|
|
1503
1526
|
.,.,
|
|
1504
1527
|
|
|
1505
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1528
|
+
module_eval(<<'.,.,', 'parser.y', 53)
|
|
1506
1529
|
def _reduce_37(val, _values, result)
|
|
1507
|
-
result = val[2].reject { |x| x[:af] == :
|
|
1530
|
+
result = val[2].reject { |x| x[:af] == :inet6 }.map { |x| x[:af] = :inet ; x }
|
|
1508
1531
|
result
|
|
1509
1532
|
end
|
|
1510
1533
|
.,.,
|
|
1511
1534
|
|
|
1512
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1535
|
+
module_eval(<<'.,.,', 'parser.y', 55)
|
|
1513
1536
|
def _reduce_38(val, _values, result)
|
|
1514
1537
|
result = val[2].reject { |x| x[:af] == :inet }.map { |x| x[:af] = :inet6 ; x }
|
|
1515
1538
|
result
|
|
@@ -1518,6 +1541,13 @@ module_eval(<<'.,.,', 'parser.y', 53)
|
|
|
1518
1541
|
|
|
1519
1542
|
module_eval(<<'.,.,', 'parser.y', 56)
|
|
1520
1543
|
def _reduce_39(val, _values, result)
|
|
1544
|
+
result = val[2].reject { |x| x[:af] == :inet }.map { |x| x[:af] = :inet6 ; x }
|
|
1545
|
+
result
|
|
1546
|
+
end
|
|
1547
|
+
.,.,
|
|
1548
|
+
|
|
1549
|
+
module_eval(<<'.,.,', 'parser.y', 59)
|
|
1550
|
+
def _reduce_40(val, _values, result)
|
|
1521
1551
|
begin
|
|
1522
1552
|
result = constraint_service_to_hosts(val[1], val[2])
|
|
1523
1553
|
rescue KeyError
|
|
@@ -1528,8 +1558,8 @@ module_eval(<<'.,.,', 'parser.y', 56)
|
|
|
1528
1558
|
end
|
|
1529
1559
|
.,.,
|
|
1530
1560
|
|
|
1531
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1532
|
-
def
|
|
1561
|
+
module_eval(<<'.,.,', 'parser.y', 66)
|
|
1562
|
+
def _reduce_41(val, _values, result)
|
|
1533
1563
|
begin
|
|
1534
1564
|
raise "service #{val[1]} cannot be used as client" if @services.fetch(val[1]).map { |x| x[:dir] }.compact.any?
|
|
1535
1565
|
result = constraint_service_to_hosts(val[1], val[2]).map { |item| item.merge(dir: :out) }
|
|
@@ -1541,8 +1571,8 @@ module_eval(<<'.,.,', 'parser.y', 63)
|
|
|
1541
1571
|
end
|
|
1542
1572
|
.,.,
|
|
1543
1573
|
|
|
1544
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1545
|
-
def
|
|
1574
|
+
module_eval(<<'.,.,', 'parser.y', 74)
|
|
1575
|
+
def _reduce_42(val, _values, result)
|
|
1546
1576
|
begin
|
|
1547
1577
|
raise "service #{val[1]} cannot be used as server" if @services.fetch(val[1]).map { |x| x[:dir] }.compact.any?
|
|
1548
1578
|
result = constraint_service_to_hosts(val[1], val[2]).map { |item| item.merge(dir: :in) }
|
|
@@ -1554,245 +1584,248 @@ module_eval(<<'.,.,', 'parser.y', 71)
|
|
|
1554
1584
|
end
|
|
1555
1585
|
.,.,
|
|
1556
1586
|
|
|
1557
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1558
|
-
def
|
|
1587
|
+
module_eval(<<'.,.,', 'parser.y', 81)
|
|
1588
|
+
def _reduce_43(val, _values, result)
|
|
1559
1589
|
result = [val.compact.inject(:merge)]
|
|
1560
1590
|
result
|
|
1561
1591
|
end
|
|
1562
1592
|
.,.,
|
|
1563
1593
|
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1594
|
+
module_eval(<<'.,.,', 'parser.y', 83)
|
|
1595
|
+
def _reduce_44(val, _values, result)
|
|
1596
|
+
result = { log: true }
|
|
1597
|
+
result
|
|
1598
|
+
end
|
|
1599
|
+
.,.,
|
|
1569
1600
|
|
|
1570
1601
|
module_eval(<<'.,.,', 'parser.y', 84)
|
|
1571
|
-
def
|
|
1572
|
-
result = {
|
|
1602
|
+
def _reduce_45(val, _values, result)
|
|
1603
|
+
result = {}
|
|
1573
1604
|
result
|
|
1574
1605
|
end
|
|
1575
1606
|
.,.,
|
|
1576
1607
|
|
|
1577
|
-
|
|
1608
|
+
# reduce 46 omitted
|
|
1609
|
+
|
|
1610
|
+
module_eval(<<'.,.,', 'parser.y', 87)
|
|
1578
1611
|
def _reduce_47(val, _values, result)
|
|
1579
|
-
result = {
|
|
1612
|
+
result = { on: val[1][:value] }
|
|
1580
1613
|
result
|
|
1581
1614
|
end
|
|
1582
1615
|
.,.,
|
|
1583
1616
|
|
|
1584
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1617
|
+
module_eval(<<'.,.,', 'parser.y', 89)
|
|
1585
1618
|
def _reduce_48(val, _values, result)
|
|
1586
|
-
result = { action: :
|
|
1619
|
+
result = { action: :block }
|
|
1587
1620
|
result
|
|
1588
1621
|
end
|
|
1589
1622
|
.,.,
|
|
1590
1623
|
|
|
1591
|
-
# reduce 49 omitted
|
|
1592
|
-
|
|
1593
1624
|
module_eval(<<'.,.,', 'parser.y', 90)
|
|
1594
|
-
def
|
|
1595
|
-
result = {
|
|
1625
|
+
def _reduce_49(val, _values, result)
|
|
1626
|
+
result = { action: :pass }
|
|
1596
1627
|
result
|
|
1597
1628
|
end
|
|
1598
1629
|
.,.,
|
|
1599
1630
|
|
|
1600
|
-
|
|
1631
|
+
# reduce 50 omitted
|
|
1632
|
+
|
|
1633
|
+
module_eval(<<'.,.,', 'parser.y', 93)
|
|
1601
1634
|
def _reduce_51(val, _values, result)
|
|
1602
|
-
result = { dir: val[
|
|
1635
|
+
result = { dir: val[1] }
|
|
1603
1636
|
result
|
|
1604
1637
|
end
|
|
1605
1638
|
.,.,
|
|
1606
1639
|
|
|
1607
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1640
|
+
module_eval(<<'.,.,', 'parser.y', 94)
|
|
1608
1641
|
def _reduce_52(val, _values, result)
|
|
1609
|
-
result = val[0]
|
|
1642
|
+
result = { dir: val[0] }
|
|
1610
1643
|
result
|
|
1611
1644
|
end
|
|
1612
1645
|
.,.,
|
|
1613
1646
|
|
|
1614
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1647
|
+
module_eval(<<'.,.,', 'parser.y', 96)
|
|
1615
1648
|
def _reduce_53(val, _values, result)
|
|
1616
|
-
result = val[0] + [val[
|
|
1649
|
+
result = val[0] + [val[2]]
|
|
1617
1650
|
result
|
|
1618
1651
|
end
|
|
1619
1652
|
.,.,
|
|
1620
1653
|
|
|
1621
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1654
|
+
module_eval(<<'.,.,', 'parser.y', 97)
|
|
1622
1655
|
def _reduce_54(val, _values, result)
|
|
1623
|
-
result =
|
|
1656
|
+
result = val[0] + [val[1]]
|
|
1624
1657
|
result
|
|
1625
1658
|
end
|
|
1626
1659
|
.,.,
|
|
1627
1660
|
|
|
1628
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1661
|
+
module_eval(<<'.,.,', 'parser.y', 98)
|
|
1629
1662
|
def _reduce_55(val, _values, result)
|
|
1630
|
-
result =
|
|
1663
|
+
result = [val[0]]
|
|
1631
1664
|
result
|
|
1632
1665
|
end
|
|
1633
1666
|
.,.,
|
|
1634
1667
|
|
|
1635
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1668
|
+
module_eval(<<'.,.,', 'parser.y', 100)
|
|
1636
1669
|
def _reduce_56(val, _values, result)
|
|
1637
|
-
result = :
|
|
1670
|
+
result = :in
|
|
1638
1671
|
result
|
|
1639
1672
|
end
|
|
1640
1673
|
.,.,
|
|
1641
1674
|
|
|
1642
|
-
# reduce 57 omitted
|
|
1643
|
-
|
|
1644
1675
|
module_eval(<<'.,.,', 'parser.y', 101)
|
|
1645
|
-
def
|
|
1646
|
-
result =
|
|
1676
|
+
def _reduce_57(val, _values, result)
|
|
1677
|
+
result = :out
|
|
1647
1678
|
result
|
|
1648
1679
|
end
|
|
1649
1680
|
.,.,
|
|
1650
1681
|
|
|
1651
|
-
|
|
1682
|
+
# reduce 58 omitted
|
|
1683
|
+
|
|
1684
|
+
module_eval(<<'.,.,', 'parser.y', 104)
|
|
1652
1685
|
def _reduce_59(val, _values, result)
|
|
1653
|
-
result = { af: :
|
|
1686
|
+
result = { af: :inet }
|
|
1654
1687
|
result
|
|
1655
1688
|
end
|
|
1656
1689
|
.,.,
|
|
1657
1690
|
|
|
1658
|
-
# reduce 60 omitted
|
|
1659
|
-
|
|
1660
1691
|
module_eval(<<'.,.,', 'parser.y', 105)
|
|
1661
|
-
def
|
|
1662
|
-
result = {
|
|
1692
|
+
def _reduce_60(val, _values, result)
|
|
1693
|
+
result = { af: :inet6 }
|
|
1663
1694
|
result
|
|
1664
1695
|
end
|
|
1665
1696
|
.,.,
|
|
1666
1697
|
|
|
1667
|
-
|
|
1698
|
+
# reduce 61 omitted
|
|
1699
|
+
|
|
1700
|
+
module_eval(<<'.,.,', 'parser.y', 108)
|
|
1668
1701
|
def _reduce_62(val, _values, result)
|
|
1669
|
-
result = { proto: val[
|
|
1702
|
+
result = { proto: val[2] }
|
|
1670
1703
|
result
|
|
1671
1704
|
end
|
|
1672
1705
|
.,.,
|
|
1673
1706
|
|
|
1674
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1707
|
+
module_eval(<<'.,.,', 'parser.y', 109)
|
|
1675
1708
|
def _reduce_63(val, _values, result)
|
|
1676
|
-
result =
|
|
1709
|
+
result = { proto: val[1] }
|
|
1677
1710
|
result
|
|
1678
1711
|
end
|
|
1679
1712
|
.,.,
|
|
1680
1713
|
|
|
1681
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1714
|
+
module_eval(<<'.,.,', 'parser.y', 111)
|
|
1682
1715
|
def _reduce_64(val, _values, result)
|
|
1683
|
-
result = val[0] + [val[
|
|
1716
|
+
result = val[0] + [val[2]]
|
|
1684
1717
|
result
|
|
1685
1718
|
end
|
|
1686
1719
|
.,.,
|
|
1687
1720
|
|
|
1688
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1721
|
+
module_eval(<<'.,.,', 'parser.y', 112)
|
|
1689
1722
|
def _reduce_65(val, _values, result)
|
|
1690
|
-
result =
|
|
1723
|
+
result = val[0] + [val[1]]
|
|
1691
1724
|
result
|
|
1692
1725
|
end
|
|
1693
1726
|
.,.,
|
|
1694
1727
|
|
|
1695
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1728
|
+
module_eval(<<'.,.,', 'parser.y', 113)
|
|
1696
1729
|
def _reduce_66(val, _values, result)
|
|
1697
|
-
result = val[0]
|
|
1730
|
+
result = [val[0]]
|
|
1698
1731
|
result
|
|
1699
1732
|
end
|
|
1700
1733
|
.,.,
|
|
1701
1734
|
|
|
1702
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1735
|
+
module_eval(<<'.,.,', 'parser.y', 115)
|
|
1703
1736
|
def _reduce_67(val, _values, result)
|
|
1704
|
-
result =
|
|
1737
|
+
result = val[0][:value].to_sym
|
|
1705
1738
|
result
|
|
1706
1739
|
end
|
|
1707
1740
|
.,.,
|
|
1708
1741
|
|
|
1709
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1742
|
+
module_eval(<<'.,.,', 'parser.y', 117)
|
|
1710
1743
|
def _reduce_68(val, _values, result)
|
|
1711
|
-
result = { from: val[1] }
|
|
1744
|
+
result = { from: val[1], to: val[3] }
|
|
1712
1745
|
result
|
|
1713
1746
|
end
|
|
1714
1747
|
.,.,
|
|
1715
1748
|
|
|
1716
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1749
|
+
module_eval(<<'.,.,', 'parser.y', 118)
|
|
1717
1750
|
def _reduce_69(val, _values, result)
|
|
1718
|
-
result = {
|
|
1751
|
+
result = { from: val[1] }
|
|
1719
1752
|
result
|
|
1720
1753
|
end
|
|
1721
1754
|
.,.,
|
|
1722
1755
|
|
|
1723
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1756
|
+
module_eval(<<'.,.,', 'parser.y', 119)
|
|
1724
1757
|
def _reduce_70(val, _values, result)
|
|
1725
|
-
result = {}
|
|
1758
|
+
result = { to: val[1] }
|
|
1726
1759
|
result
|
|
1727
1760
|
end
|
|
1728
1761
|
.,.,
|
|
1729
1762
|
|
|
1730
|
-
# reduce 71 omitted
|
|
1731
|
-
|
|
1732
1763
|
module_eval(<<'.,.,', 'parser.y', 120)
|
|
1733
|
-
def
|
|
1764
|
+
def _reduce_71(val, _values, result)
|
|
1734
1765
|
result = {}
|
|
1735
1766
|
result
|
|
1736
1767
|
end
|
|
1737
1768
|
.,.,
|
|
1738
1769
|
|
|
1739
|
-
|
|
1770
|
+
# reduce 72 omitted
|
|
1771
|
+
|
|
1772
|
+
module_eval(<<'.,.,', 'parser.y', 123)
|
|
1740
1773
|
def _reduce_73(val, _values, result)
|
|
1741
|
-
result =
|
|
1774
|
+
result = {}
|
|
1742
1775
|
result
|
|
1743
1776
|
end
|
|
1744
1777
|
.,.,
|
|
1745
1778
|
|
|
1746
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1779
|
+
module_eval(<<'.,.,', 'parser.y', 125)
|
|
1747
1780
|
def _reduce_74(val, _values, result)
|
|
1748
|
-
result = [{ host:
|
|
1781
|
+
result = [{ host: nil, port: val[1] }]
|
|
1749
1782
|
result
|
|
1750
1783
|
end
|
|
1751
1784
|
.,.,
|
|
1752
1785
|
|
|
1753
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1786
|
+
module_eval(<<'.,.,', 'parser.y', 126)
|
|
1754
1787
|
def _reduce_75(val, _values, result)
|
|
1755
1788
|
result = [{ host: nil, port: val[0] }]
|
|
1756
1789
|
result
|
|
1757
1790
|
end
|
|
1758
1791
|
.,.,
|
|
1759
1792
|
|
|
1760
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1793
|
+
module_eval(<<'.,.,', 'parser.y', 127)
|
|
1761
1794
|
def _reduce_76(val, _values, result)
|
|
1762
|
-
result = [{ host: val[
|
|
1795
|
+
result = [{ host: val[0], port: val[1] }]
|
|
1763
1796
|
result
|
|
1764
1797
|
end
|
|
1765
1798
|
.,.,
|
|
1766
1799
|
|
|
1767
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1800
|
+
module_eval(<<'.,.,', 'parser.y', 128)
|
|
1768
1801
|
def _reduce_77(val, _values, result)
|
|
1769
|
-
result = [{ host:
|
|
1802
|
+
result = [{ host: val[1], port: val[3] }]
|
|
1770
1803
|
result
|
|
1771
1804
|
end
|
|
1772
1805
|
.,.,
|
|
1773
1806
|
|
|
1774
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1807
|
+
module_eval(<<'.,.,', 'parser.y', 129)
|
|
1775
1808
|
def _reduce_78(val, _values, result)
|
|
1776
1809
|
result = Resolver.instance.resolv_srv(val[2][:value])
|
|
1777
1810
|
result
|
|
1778
1811
|
end
|
|
1779
1812
|
.,.,
|
|
1780
1813
|
|
|
1781
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1814
|
+
module_eval(<<'.,.,', 'parser.y', 130)
|
|
1782
1815
|
def _reduce_79(val, _values, result)
|
|
1783
1816
|
result = Resolver.instance.resolv_apt_mirror(val[2][:value])
|
|
1784
1817
|
result
|
|
1785
1818
|
end
|
|
1786
1819
|
.,.,
|
|
1787
1820
|
|
|
1788
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1821
|
+
module_eval(<<'.,.,', 'parser.y', 132)
|
|
1789
1822
|
def _reduce_80(val, _values, result)
|
|
1790
1823
|
result = val[2]
|
|
1791
1824
|
result
|
|
1792
1825
|
end
|
|
1793
1826
|
.,.,
|
|
1794
1827
|
|
|
1795
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1828
|
+
module_eval(<<'.,.,', 'parser.y', 133)
|
|
1796
1829
|
def _reduce_81(val, _values, result)
|
|
1797
1830
|
result = val[1]
|
|
1798
1831
|
result
|
|
@@ -1801,120 +1834,155 @@ module_eval(<<'.,.,', 'parser.y', 131)
|
|
|
1801
1834
|
|
|
1802
1835
|
# reduce 82 omitted
|
|
1803
1836
|
|
|
1804
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1837
|
+
module_eval(<<'.,.,', 'parser.y', 136)
|
|
1805
1838
|
def _reduce_83(val, _values, result)
|
|
1806
|
-
result = val[0] +
|
|
1839
|
+
result = val[0] + val[2]
|
|
1807
1840
|
result
|
|
1808
1841
|
end
|
|
1809
1842
|
.,.,
|
|
1810
1843
|
|
|
1811
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1844
|
+
module_eval(<<'.,.,', 'parser.y', 137)
|
|
1812
1845
|
def _reduce_84(val, _values, result)
|
|
1813
|
-
result = val[0] +
|
|
1846
|
+
result = val[0] + val[1]
|
|
1814
1847
|
result
|
|
1815
1848
|
end
|
|
1816
1849
|
.,.,
|
|
1817
1850
|
|
|
1818
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1851
|
+
module_eval(<<'.,.,', 'parser.y', 138)
|
|
1819
1852
|
def _reduce_85(val, _values, result)
|
|
1820
|
-
result =
|
|
1853
|
+
result = val[0]
|
|
1821
1854
|
result
|
|
1822
1855
|
end
|
|
1823
1856
|
.,.,
|
|
1824
1857
|
|
|
1825
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1858
|
+
module_eval(<<'.,.,', 'parser.y', 140)
|
|
1826
1859
|
def _reduce_86(val, _values, result)
|
|
1827
|
-
result = val[0]
|
|
1860
|
+
result = [val[0]]
|
|
1828
1861
|
result
|
|
1829
1862
|
end
|
|
1830
1863
|
.,.,
|
|
1831
1864
|
|
|
1832
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1865
|
+
module_eval(<<'.,.,', 'parser.y', 141)
|
|
1833
1866
|
def _reduce_87(val, _values, result)
|
|
1834
|
-
result = val[0][:value]
|
|
1867
|
+
result = @variables.fetch(val[0][:value])
|
|
1835
1868
|
result
|
|
1836
1869
|
end
|
|
1837
1870
|
.,.,
|
|
1838
1871
|
|
|
1839
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1872
|
+
module_eval(<<'.,.,', 'parser.y', 143)
|
|
1840
1873
|
def _reduce_88(val, _values, result)
|
|
1841
|
-
result =
|
|
1874
|
+
result = val[0][:value]
|
|
1842
1875
|
result
|
|
1843
1876
|
end
|
|
1844
1877
|
.,.,
|
|
1845
1878
|
|
|
1846
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1879
|
+
module_eval(<<'.,.,', 'parser.y', 144)
|
|
1847
1880
|
def _reduce_89(val, _values, result)
|
|
1848
1881
|
result = val[0][:value]
|
|
1849
1882
|
result
|
|
1850
1883
|
end
|
|
1851
1884
|
.,.,
|
|
1852
1885
|
|
|
1853
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1886
|
+
module_eval(<<'.,.,', 'parser.y', 145)
|
|
1854
1887
|
def _reduce_90(val, _values, result)
|
|
1855
|
-
result = val[0][:value]
|
|
1888
|
+
result = Range.new(val[0][:value], val[2][:value])
|
|
1856
1889
|
result
|
|
1857
1890
|
end
|
|
1858
1891
|
.,.,
|
|
1859
1892
|
|
|
1860
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1893
|
+
module_eval(<<'.,.,', 'parser.y', 147)
|
|
1861
1894
|
def _reduce_91(val, _values, result)
|
|
1862
|
-
result = val[0]
|
|
1895
|
+
result = val[0][:value]
|
|
1863
1896
|
result
|
|
1864
1897
|
end
|
|
1865
1898
|
.,.,
|
|
1866
1899
|
|
|
1867
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1900
|
+
module_eval(<<'.,.,', 'parser.y', 148)
|
|
1868
1901
|
def _reduce_92(val, _values, result)
|
|
1869
|
-
result = val[0]
|
|
1902
|
+
result = val[0][:value]
|
|
1870
1903
|
result
|
|
1871
1904
|
end
|
|
1872
1905
|
.,.,
|
|
1873
1906
|
|
|
1874
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1907
|
+
module_eval(<<'.,.,', 'parser.y', 150)
|
|
1875
1908
|
def _reduce_93(val, _values, result)
|
|
1876
|
-
result =
|
|
1909
|
+
result = val[0] + val[2]
|
|
1877
1910
|
result
|
|
1878
1911
|
end
|
|
1879
1912
|
.,.,
|
|
1880
1913
|
|
|
1881
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1914
|
+
module_eval(<<'.,.,', 'parser.y', 151)
|
|
1882
1915
|
def _reduce_94(val, _values, result)
|
|
1883
|
-
result = val[0]
|
|
1916
|
+
result = val[0] + val[1]
|
|
1884
1917
|
result
|
|
1885
1918
|
end
|
|
1886
1919
|
.,.,
|
|
1887
1920
|
|
|
1888
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1921
|
+
module_eval(<<'.,.,', 'parser.y', 152)
|
|
1889
1922
|
def _reduce_95(val, _values, result)
|
|
1890
|
-
result = val[0]
|
|
1923
|
+
result = val[0]
|
|
1891
1924
|
result
|
|
1892
1925
|
end
|
|
1893
1926
|
.,.,
|
|
1894
1927
|
|
|
1895
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1928
|
+
module_eval(<<'.,.,', 'parser.y', 154)
|
|
1896
1929
|
def _reduce_96(val, _values, result)
|
|
1897
|
-
result =
|
|
1930
|
+
result = [val[0]]
|
|
1898
1931
|
result
|
|
1899
1932
|
end
|
|
1900
1933
|
.,.,
|
|
1901
1934
|
|
|
1902
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1935
|
+
module_eval(<<'.,.,', 'parser.y', 155)
|
|
1903
1936
|
def _reduce_97(val, _values, result)
|
|
1904
|
-
result =
|
|
1937
|
+
result = @variables.fetch(val[0][:value])
|
|
1905
1938
|
result
|
|
1906
1939
|
end
|
|
1907
1940
|
.,.,
|
|
1908
1941
|
|
|
1909
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1942
|
+
module_eval(<<'.,.,', 'parser.y', 156)
|
|
1910
1943
|
def _reduce_98(val, _values, result)
|
|
1911
|
-
result =
|
|
1944
|
+
result = Resolver.instance.resolv_azure_ip_range(val[2][:value])
|
|
1912
1945
|
result
|
|
1913
1946
|
end
|
|
1914
1947
|
.,.,
|
|
1915
1948
|
|
|
1916
|
-
module_eval(<<'.,.,', 'parser.y',
|
|
1949
|
+
module_eval(<<'.,.,', 'parser.y', 158)
|
|
1917
1950
|
def _reduce_99(val, _values, result)
|
|
1951
|
+
result = val[0].merge(val[2])
|
|
1952
|
+
result
|
|
1953
|
+
end
|
|
1954
|
+
.,.,
|
|
1955
|
+
|
|
1956
|
+
module_eval(<<'.,.,', 'parser.y', 159)
|
|
1957
|
+
def _reduce_100(val, _values, result)
|
|
1958
|
+
result = val[0].merge(val[1])
|
|
1959
|
+
result
|
|
1960
|
+
end
|
|
1961
|
+
.,.,
|
|
1962
|
+
|
|
1963
|
+
module_eval(<<'.,.,', 'parser.y', 160)
|
|
1964
|
+
def _reduce_101(val, _values, result)
|
|
1965
|
+
result = {}
|
|
1966
|
+
result
|
|
1967
|
+
end
|
|
1968
|
+
.,.,
|
|
1969
|
+
|
|
1970
|
+
module_eval(<<'.,.,', 'parser.y', 162)
|
|
1971
|
+
def _reduce_102(val, _values, result)
|
|
1972
|
+
result = { rdr_to: [{ host: val[1][:value], port: val[3][:value] }] }
|
|
1973
|
+
result
|
|
1974
|
+
end
|
|
1975
|
+
.,.,
|
|
1976
|
+
|
|
1977
|
+
module_eval(<<'.,.,', 'parser.y', 163)
|
|
1978
|
+
def _reduce_103(val, _values, result)
|
|
1979
|
+
result = { rdr_to: [{ host: val[1][:value], port: nil }] }
|
|
1980
|
+
result
|
|
1981
|
+
end
|
|
1982
|
+
.,.,
|
|
1983
|
+
|
|
1984
|
+
module_eval(<<'.,.,', 'parser.y', 164)
|
|
1985
|
+
def _reduce_104(val, _values, result)
|
|
1918
1986
|
result = { nat_to: val[1][:value] }
|
|
1919
1987
|
result
|
|
1920
1988
|
end
|