|
Bugzilla – Full Text Bug Listing |
| Summary: | Yast firewall custom rules stores source as dest port | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.3 | Reporter: | Volker Kuhlmann <bugz57> |
| Component: | YaST2 | Assignee: | Lukas Ocilka <locilka> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Alpha 5 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Beta-Customer | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | yast logs of entering a custom rule with optional source port argument | ||
|
Description
Volker Kuhlmann
2007-06-17 09:56:32 UTC
Please attach y2logs. If you are in doubt follow: http://en.opensuse.org/Bugs/YaST Thanks! No problem. I've cleared out /var/log/YaST2 to get rid of the installation junk, and added a custom rule to allow 10.1.1.0/24 tcp *source* port 999 in on the external zone. Immediately after entering those numbers in the popup, the advanced rule window shows the rule with *dest* port 999. Seems like a trivial thing to me: there are 2 optional arguments, dest port and source port. If only the second one is given, it is treated as if it was the first. Btw making the first optional argument mandatory when entering the second optional one doesn't work here, they have to be independently optional. Created attachment 148073 [details]
yast logs of entering a custom rule with optional source port argument
A patch:
Index: SuSEFirewallExpertRules.ycp
===================================================================
--- SuSEFirewallExpertRules.ycp (revision 39103)
+++ SuSEFirewallExpertRules.ycp (working copy)
@@ -244,8 +244,17 @@
// Creating new record
string new_rule = params["network"]:"" + "," + params["protocol"]:"";
- if (params["dport"]:"" != "") new_rule = new_rule + "," + params["dport"]:"";
- if (params["sport"]:"" != "") new_rule = new_rule + "," + params["sport"]:"";
+
+ // either 'dport' or 'sport'
+ if (params["dport"]:"" != "" || params["sport"]:"" != "") {
+ // 'dport' can be empty even if 'sport' is set
+ new_rule = new_rule + "," + params["dport"]:"";
+
+ if (params["sport"]:"" != "") {
+ new_rule = new_rule + "," + params["sport"]:"";
+ }
+ }
+
if (new_rule == "0/0,all") {
y2warning("Adding rule '%1' that allows everything from all networks!", new_rule);
}
Fixed in yast2-2.15.38
|