|
|
21c891 |
From 03871c1e06b2384442b0e4f359e848d25e380875 Mon Sep 17 00:00:00 2001
|
|
|
21c891 |
From: Eric Garver <e@erig.me>
|
|
|
21c891 |
Date: Wed, 28 Nov 2018 10:14:19 -0500
|
|
|
21c891 |
Subject: [PATCH 23/34] firewall-config: support rich rule priorities
|
|
|
21c891 |
|
|
|
21c891 |
(cherry picked from commit e7998960fb285120b3b97e163bb87e25976d22d0)
|
|
|
21c891 |
---
|
|
|
21c891 |
src/firewall-config.glade | 163 ++++++++++++--------------------------
|
|
|
21c891 |
src/firewall-config.in | 33 ++++++--
|
|
|
21c891 |
2 files changed, 76 insertions(+), 120 deletions(-)
|
|
|
21c891 |
|
|
|
21c891 |
diff --git a/src/firewall-config.glade b/src/firewall-config.glade
|
|
|
21c891 |
index 75c229b408fd..689433c47eca 100644
|
|
|
21c891 |
--- a/src/firewall-config.glade
|
|
|
21c891 |
+++ b/src/firewall-config.glade
|
|
|
21c891 |
@@ -1,5 +1,5 @@
|
|
|
21c891 |
|
|
|
21c891 |
-
|
|
|
21c891 |
+
|
|
|
21c891 |
<interface>
|
|
|
21c891 |
<requires lib="gtk+" version="3.6"/>
|
|
|
21c891 |
|
|
|
21c891 |
@@ -31,9 +31,6 @@
|
|
|
21c891 |
</child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="addressDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -169,9 +166,6 @@
|
|
|
21c891 |
<action-widget response="-1">addressDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">addressDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="automaticHelpersDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -292,9 +286,6 @@
|
|
|
21c891 |
<action-widget response="-1">automaticHelpersDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">automaticHelpersDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="commandDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -414,9 +405,6 @@
|
|
|
21c891 |
<action-widget response="-1">commandDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">commandDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="contextDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -536,9 +524,6 @@
|
|
|
21c891 |
<action-widget response="-1">contextDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">contextDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="defaultZoneDialog">
|
|
|
21c891 |
<property name="width_request">200</property>
|
|
|
21c891 |
@@ -660,9 +645,6 @@
|
|
|
21c891 |
<action-widget response="-1">portDialogCancelButton1</action-widget>
|
|
|
21c891 |
<action-widget response="1">defaultZoneDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="directChainDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -862,9 +844,6 @@
|
|
|
21c891 |
<action-widget response="-1">directChainDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">directChainDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="directPassthroughDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -1028,9 +1007,6 @@
|
|
|
21c891 |
<action-widget response="-1">directPassthroughDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">directPassthroughDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="forwardDialog">
|
|
|
21c891 |
<property name="width_request">200</property>
|
|
|
21c891 |
@@ -1369,9 +1345,6 @@
|
|
|
21c891 |
<action-widget response="-1">button15</action-widget>
|
|
|
21c891 |
<action-widget response="1">forwardDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="helperBaseDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -1715,9 +1688,6 @@
|
|
|
21c891 |
<action-widget response="-1">helperBaseDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">helperBaseDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="helperDialog">
|
|
|
21c891 |
<property name="height_request">300</property>
|
|
|
21c891 |
@@ -1832,9 +1802,6 @@
|
|
|
21c891 |
<action-widget response="-1">helperDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">helperDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="icmpBaseDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -2070,9 +2037,6 @@
|
|
|
21c891 |
<action-widget response="-1">icmpBaseDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">icmpBaseDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="icmptypeDialog">
|
|
|
21c891 |
<property name="height_request">300</property>
|
|
|
21c891 |
@@ -2186,9 +2150,6 @@
|
|
|
21c891 |
<action-widget response="-1">icmptypeDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">icmptypeDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkImage" id="image1">
|
|
|
21c891 |
<property name="visible">True</property>
|
|
|
21c891 |
@@ -7852,9 +7813,6 @@
|
|
|
21c891 |
<action-widget response="-1">interfaceDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">interfaceDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="ipsetBaseDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -8258,9 +8216,6 @@
|
|
|
21c891 |
<action-widget response="-1">ipsetBaseDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">ipsetBaseDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="ipsetDialog">
|
|
|
21c891 |
<property name="width_request">300</property>
|
|
|
21c891 |
@@ -8375,9 +8330,6 @@
|
|
|
21c891 |
<action-widget response="-1">ipsetDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">ipsetDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="ipsetEntryDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -8541,9 +8493,6 @@
|
|
|
21c891 |
<action-widget response="-1">ipsetEntryDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">ipsetEntryDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="logDeniedDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -8664,9 +8613,6 @@
|
|
|
21c891 |
<action-widget response="-1">logDeniedDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">logDeniedDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkTextBuffer" id="logTextBuffer"/>
|
|
|
21c891 |
<object class="GtkDialog" id="macDialog">
|
|
|
21c891 |
@@ -8789,9 +8735,6 @@
|
|
|
21c891 |
<action-widget response="-1">macDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">macDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="markDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -8969,9 +8912,6 @@
|
|
|
21c891 |
<action-widget response="-1">markDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">markDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="moduleDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -9139,9 +9079,6 @@
|
|
|
21c891 |
<action-widget response="-1">moduleDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">moduleDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="portDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -9307,9 +9244,6 @@
|
|
|
21c891 |
<action-widget response="-1">portDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">portDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkAdjustment" id="priority_adjustment">
|
|
|
21c891 |
<property name="lower">-99999999</property>
|
|
|
21c891 |
@@ -9563,9 +9497,6 @@
|
|
|
21c891 |
<action-widget response="-1">directRuleDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">directRuleDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="protoDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -9744,9 +9675,12 @@
|
|
|
21c891 |
<action-widget response="-1">protoDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">protoDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
+ </object>
|
|
|
21c891 |
+ <object class="GtkAdjustment" id="rich_rule_priority_adjustment">
|
|
|
21c891 |
+ <property name="lower">-32768</property>
|
|
|
21c891 |
+ <property name="upper">32767</property>
|
|
|
21c891 |
+ <property name="step_increment">1</property>
|
|
|
21c891 |
+ <property name="page_increment">10</property>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="richRuleDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -9855,7 +9789,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">6</property>
|
|
|
21c891 |
+ <property name="top_attach">7</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -9868,7 +9802,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">8</property>
|
|
|
21c891 |
+ <property name="top_attach">9</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -9884,7 +9818,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">10</property>
|
|
|
21c891 |
+ <property name="top_attach">11</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -9900,7 +9834,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">12</property>
|
|
|
21c891 |
+ <property name="top_attach">13</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10024,7 +9958,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">1</property>
|
|
|
21c891 |
- <property name="top_attach">6</property>
|
|
|
21c891 |
+ <property name="top_attach">7</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10113,7 +10047,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">1</property>
|
|
|
21c891 |
- <property name="top_attach">8</property>
|
|
|
21c891 |
+ <property name="top_attach">9</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10375,7 +10309,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">1</property>
|
|
|
21c891 |
- <property name="top_attach">4</property>
|
|
|
21c891 |
+ <property name="top_attach">5</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10541,7 +10475,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">1</property>
|
|
|
21c891 |
- <property name="top_attach">10</property>
|
|
|
21c891 |
+ <property name="top_attach">11</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10627,7 +10561,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">1</property>
|
|
|
21c891 |
- <property name="top_attach">12</property>
|
|
|
21c891 |
+ <property name="top_attach">13</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10724,7 +10658,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">1</property>
|
|
|
21c891 |
- <property name="top_attach">2</property>
|
|
|
21c891 |
+ <property name="top_attach">3</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10753,7 +10687,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">2</property>
|
|
|
21c891 |
+ <property name="top_attach">3</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
<child>
|
|
|
21c891 |
@@ -10763,7 +10697,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">1</property>
|
|
|
21c891 |
+ <property name="top_attach">2</property>
|
|
|
21c891 |
<property name="width">2</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
@@ -10774,7 +10708,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">3</property>
|
|
|
21c891 |
+ <property name="top_attach">4</property>
|
|
|
21c891 |
<property name="width">2</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
@@ -10785,7 +10719,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">5</property>
|
|
|
21c891 |
+ <property name="top_attach">6</property>
|
|
|
21c891 |
<property name="width">2</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
@@ -10796,7 +10730,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">7</property>
|
|
|
21c891 |
+ <property name="top_attach">8</property>
|
|
|
21c891 |
<property name="width">2</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
@@ -10807,7 +10741,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">9</property>
|
|
|
21c891 |
+ <property name="top_attach">10</property>
|
|
|
21c891 |
<property name="width">2</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
@@ -10818,7 +10752,7 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">11</property>
|
|
|
21c891 |
+ <property name="top_attach">12</property>
|
|
|
21c891 |
<property name="width">2</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
@@ -10835,7 +10769,33 @@
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<packing>
|
|
|
21c891 |
<property name="left_attach">0</property>
|
|
|
21c891 |
- <property name="top_attach">4</property>
|
|
|
21c891 |
+ <property name="top_attach">5</property>
|
|
|
21c891 |
+ </packing>
|
|
|
21c891 |
+ </child>
|
|
|
21c891 |
+ <child>
|
|
|
21c891 |
+ <object class="GtkLabel">
|
|
|
21c891 |
+ <property name="visible">True</property>
|
|
|
21c891 |
+ <property name="can_focus">False</property>
|
|
|
21c891 |
+ <property name="label" translatable="yes">Priority:</property>
|
|
|
21c891 |
+ <property name="xalign">1</property>
|
|
|
21c891 |
+ </object>
|
|
|
21c891 |
+ <packing>
|
|
|
21c891 |
+ <property name="left_attach">0</property>
|
|
|
21c891 |
+ <property name="top_attach">1</property>
|
|
|
21c891 |
+ </packing>
|
|
|
21c891 |
+ </child>
|
|
|
21c891 |
+ <child>
|
|
|
21c891 |
+ <object class="GtkSpinButton" id="richRuleDialogPriorityEntry">
|
|
|
21c891 |
+ <property name="visible">True</property>
|
|
|
21c891 |
+ <property name="can_focus">True</property>
|
|
|
21c891 |
+ <property name="input_purpose">number</property>
|
|
|
21c891 |
+ <property name="adjustment">rich_rule_priority_adjustment</property>
|
|
|
21c891 |
+ <property name="numeric">True</property>
|
|
|
21c891 |
+ <signal name="value-changed" handler="on_richRuleDialog_changed" swapped="no"/>
|
|
|
21c891 |
+ </object>
|
|
|
21c891 |
+ <packing>
|
|
|
21c891 |
+ <property name="left_attach">1</property>
|
|
|
21c891 |
+ <property name="top_attach">1</property>
|
|
|
21c891 |
</packing>
|
|
|
21c891 |
</child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
@@ -10858,9 +10818,6 @@
|
|
|
21c891 |
<action-widget response="-1">richRuleDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">richRuleDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="serviceBaseDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -11095,9 +11052,6 @@
|
|
|
21c891 |
<action-widget response="-1">serviceBaseDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">serviceBaseDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="serviceDialog">
|
|
|
21c891 |
<property name="height_request">300</property>
|
|
|
21c891 |
@@ -11211,9 +11165,6 @@
|
|
|
21c891 |
<action-widget response="-1">serviceDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">serviceDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="sourceDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -11393,9 +11344,6 @@
|
|
|
21c891 |
<action-widget response="-1">sourceDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">sourceDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="uidDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -11517,9 +11465,6 @@
|
|
|
21c891 |
<action-widget response="-1">uidDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">uidDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkDialog" id="userDialog">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -11640,9 +11585,6 @@
|
|
|
21c891 |
<action-widget response="-1">userDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">userDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
<object class="GtkWindow" id="waitingWindow">
|
|
|
21c891 |
<property name="can_focus">False</property>
|
|
|
21c891 |
@@ -12033,8 +11975,5 @@
|
|
|
21c891 |
<action-widget response="-1">zoneBaseDialogCancelButton</action-widget>
|
|
|
21c891 |
<action-widget response="1">zoneBaseDialogOkButton</action-widget>
|
|
|
21c891 |
</action-widgets>
|
|
|
21c891 |
- <child>
|
|
|
21c891 |
- <placeholder/>
|
|
|
21c891 |
- </child>
|
|
|
21c891 |
</object>
|
|
|
21c891 |
</interface>
|
|
|
21c891 |
diff --git a/src/firewall-config.in b/src/firewall-config.in
|
|
|
21c891 |
index c19541b0ce82..373f431685cc 100755
|
|
|
21c891 |
--- a/src/firewall-config.in
|
|
|
21c891 |
+++ b/src/firewall-config.in
|
|
|
21c891 |
@@ -810,6 +810,7 @@ class FirewallConfig(object):
|
|
|
21c891 |
self.richRuleView = builder.get_object("richRuleView")
|
|
|
21c891 |
self.richRuleStore = Gtk.ListStore(GObject.TYPE_PYOBJECT, # the rule obj
|
|
|
21c891 |
GObject.TYPE_STRING, # ipv4/ipv6
|
|
|
21c891 |
+ GObject.TYPE_INT, # priority
|
|
|
21c891 |
GObject.TYPE_STRING, # action
|
|
|
21c891 |
GObject.TYPE_STRING, # element
|
|
|
21c891 |
GObject.TYPE_STRING, # source
|
|
|
21c891 |
@@ -820,18 +821,21 @@ class FirewallConfig(object):
|
|
|
21c891 |
self.richRuleView.append_column(
|
|
|
21c891 |
Gtk.TreeViewColumn(_("Family"), Gtk.CellRendererText(), text=1))
|
|
|
21c891 |
self.richRuleView.append_column(
|
|
|
21c891 |
- Gtk.TreeViewColumn(_("Action"), Gtk.CellRendererText(), text=2))
|
|
|
21c891 |
+ Gtk.TreeViewColumn(_("Priority"), Gtk.CellRendererText(), text=2))
|
|
|
21c891 |
self.richRuleView.append_column(
|
|
|
21c891 |
- Gtk.TreeViewColumn(_("Element"), Gtk.CellRendererText(), text=3))
|
|
|
21c891 |
+ Gtk.TreeViewColumn(_("Action"), Gtk.CellRendererText(), text=3))
|
|
|
21c891 |
self.richRuleView.append_column(
|
|
|
21c891 |
- Gtk.TreeViewColumn(_("Src"), Gtk.CellRendererText(), text=4))
|
|
|
21c891 |
+ Gtk.TreeViewColumn(_("Element"), Gtk.CellRendererText(), text=4))
|
|
|
21c891 |
self.richRuleView.append_column(
|
|
|
21c891 |
- Gtk.TreeViewColumn(_("Dest"), Gtk.CellRendererText(), text=5))
|
|
|
21c891 |
+ Gtk.TreeViewColumn(_("Src"), Gtk.CellRendererText(), text=5))
|
|
|
21c891 |
self.richRuleView.append_column(
|
|
|
21c891 |
- Gtk.TreeViewColumn(_("log"), Gtk.CellRendererText(), text=6))
|
|
|
21c891 |
+ Gtk.TreeViewColumn(_("Dest"), Gtk.CellRendererText(), text=6))
|
|
|
21c891 |
self.richRuleView.append_column(
|
|
|
21c891 |
- Gtk.TreeViewColumn(_("Audit"), Gtk.CellRendererText(), text=7))
|
|
|
21c891 |
+ Gtk.TreeViewColumn(_("log"), Gtk.CellRendererText(), text=7))
|
|
|
21c891 |
+ self.richRuleView.append_column(
|
|
|
21c891 |
+ Gtk.TreeViewColumn(_("Audit"), Gtk.CellRendererText(), text=8))
|
|
|
21c891 |
self.richRuleView.set_model(self.richRuleStore)
|
|
|
21c891 |
+ self.richRuleStore.set_sort_column_id(2, Gtk.SortType.ASCENDING)
|
|
|
21c891 |
|
|
|
21c891 |
self.richRuleView.get_selection().connect( \
|
|
|
21c891 |
"changed", self.change_rich_rule_selection_cb)
|
|
|
21c891 |
@@ -848,6 +852,8 @@ class FirewallConfig(object):
|
|
|
21c891 |
|
|
|
21c891 |
self.richRuleDialogFamilyCombobox = builder.get_object( \
|
|
|
21c891 |
"richRuleDialogFamilyCombobox")
|
|
|
21c891 |
+ self.richRuleDialogPriorityEntry = builder.get_object( \
|
|
|
21c891 |
+ "richRuleDialogPriorityEntry")
|
|
|
21c891 |
self.richRuleDialogElementCheck = builder.get_object( \
|
|
|
21c891 |
"richRuleDialogElementCheck")
|
|
|
21c891 |
self.richRuleDialogElementBox = builder.get_object( \
|
|
|
21c891 |
@@ -2021,6 +2027,7 @@ class FirewallConfig(object):
|
|
|
21c891 |
|
|
|
21c891 |
def _add_rich_rule(self, obj):
|
|
|
21c891 |
family = "all"
|
|
|
21c891 |
+ priority = 0
|
|
|
21c891 |
src = ""
|
|
|
21c891 |
dest = ""
|
|
|
21c891 |
elem = ""
|
|
|
21c891 |
@@ -2030,6 +2037,8 @@ class FirewallConfig(object):
|
|
|
21c891 |
|
|
|
21c891 |
if obj.family:
|
|
|
21c891 |
family = obj.family
|
|
|
21c891 |
+ if obj.priority:
|
|
|
21c891 |
+ priority = obj.priority
|
|
|
21c891 |
if obj.action:
|
|
|
21c891 |
if type(obj.action) == rich.Rich_Accept:
|
|
|
21c891 |
action = _("accept")
|
|
|
21c891 |
@@ -2096,8 +2105,8 @@ class FirewallConfig(object):
|
|
|
21c891 |
if audit == "":
|
|
|
21c891 |
audit = _("yes")
|
|
|
21c891 |
|
|
|
21c891 |
- self.richRuleStore.append([obj, family, action, elem, src, dest, log,
|
|
|
21c891 |
- audit])
|
|
|
21c891 |
+ self.richRuleStore.append([obj, family, priority, action, elem, src,
|
|
|
21c891 |
+ dest, log, audit])
|
|
|
21c891 |
|
|
|
21c891 |
def richrule_added_cb(self, zone, rule, timeout):
|
|
|
21c891 |
if not self.runtime_view or zone != self.get_selected_zone():
|
|
|
21c891 |
@@ -3085,6 +3094,7 @@ class FirewallConfig(object):
|
|
|
21c891 |
|
|
|
21c891 |
def add_edit_rich_rule(self, add):
|
|
|
21c891 |
self.richRuleDialogFamilyCombobox.set_active(0)
|
|
|
21c891 |
+ self.richRuleDialogPriorityEntry.set_value(0)
|
|
|
21c891 |
self.richRuleDialogElementCheck.set_active(False)
|
|
|
21c891 |
self.richRuleDialogElementCombobox.set_active(0)
|
|
|
21c891 |
self.richRuleDialogElementChooser.set_text("")
|
|
|
21c891 |
@@ -3143,6 +3153,8 @@ class FirewallConfig(object):
|
|
|
21c891 |
if old_obj.family in [ "ipv4", "ipv6" ]:
|
|
|
21c891 |
combobox_select_text(self.richRuleDialogFamilyCombobox,
|
|
|
21c891 |
old_obj.family, insensitive=True)
|
|
|
21c891 |
+ if old_obj.priority != 0:
|
|
|
21c891 |
+ self.richRuleDialogPriorityEntry.set_value(old_obj.priority)
|
|
|
21c891 |
|
|
|
21c891 |
if old_obj.element:
|
|
|
21c891 |
self.richRuleDialogElementCheck.set_active(True)
|
|
|
21c891 |
@@ -3633,6 +3645,11 @@ class FirewallConfig(object):
|
|
|
21c891 |
else:
|
|
|
21c891 |
rule = rich.Rich_Rule() # ipv4+ipv6 rule
|
|
|
21c891 |
|
|
|
21c891 |
+ # priority
|
|
|
21c891 |
+ priority = self.richRuleDialogPriorityEntry.get_value_as_int()
|
|
|
21c891 |
+ if priority != 0:
|
|
|
21c891 |
+ rule.priority = priority
|
|
|
21c891 |
+
|
|
|
21c891 |
# element
|
|
|
21c891 |
if self.richRuleDialogElementCheck.get_active():
|
|
|
21c891 |
combolabel = self.richRuleDialogElementCombobox.get_active_text()
|
|
|
21c891 |
--
|
|
|
21c891 |
2.18.0
|
|
|
21c891 |
|