@@ -53,6 +53,7 @@ Table=<%= @interface[:source_route_table] %>
53
53
[RoutingPolicyRule]
54
54
From=<%= @interface[:inet][:address] %>
55
55
Table=<%= @interface[:source_route_table] %>
56
+ Priority=1000
56
57
<% end -%>
57
58
<% end -%>
58
59
<% if @interface.dig(:inet6, :gateway) && @interface[:inet6][:gateway] != @interface[:inet6][:address] -%>
@@ -76,6 +77,7 @@ Table=<%= @interface[:source_route_table] %>
76
77
[RoutingPolicyRule]
77
78
From=<%= @interface[:inet6][:address] %>
78
79
Table=<%= @interface[:source_route_table] %>
80
+ Priority=1000
79
81
<% end -%>
80
82
<% end -%>
81
83
<% Hash(@interface.dig(:inet, :routes)).sort.each do |destination, details| -%>
@@ -110,3 +112,35 @@ Type=<%= details[:type] %>
110
112
<% end -%>
111
113
<% end -%>
112
114
<% end -%>
115
+ <% Array(@interface.dig(:inet, :rules)).each do |rule| -%>
116
+
117
+ [RoutingPolicyRule]
118
+ <% if details[:from] -%>
119
+ From=<%= details[:from] %>
120
+ <% end -%>
121
+ <% if details[:to] -%>
122
+ To=<%= details[:to] %>
123
+ <% end -%>
124
+ <% if details[:table] -%>
125
+ Table=<%= details[:table] %>
126
+ <% end -%>
127
+ <% if details[:priority] -%>
128
+ Priority=<%= details[:priority] %>
129
+ <% end -%>
130
+ <% end -%>
131
+ <% Array(@interface.dig(:inet6, :rules)).each do |rule| -%>
132
+
133
+ [RoutingPolicyRule]
134
+ <% if details[:from] -%>
135
+ From=<%= details[:from] %>
136
+ <% end -%>
137
+ <% if details[:to] -%>
138
+ To=<%= details[:to] %>
139
+ <% end -%>
140
+ <% if details[:table] -%>
141
+ Table=<%= details[:table] %>
142
+ <% end -%>
143
+ <% if details[:priority] -%>
144
+ Priority=<%= details[:priority] %>
145
+ <% end -%>
146
+ <% end -%>
0 commit comments