Bug 54160 - iptables-save and iptables-restore parse and produce quotes differently from each other
Summary: iptables-save and iptables-restore parse and produce quotes differently from ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: iptables
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-28 22:35 UTC by John Broadhead
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-10-26 06:09:54 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2001:144 0 normal SHIPPED_LIVE : Updated iptables packages are available 2001-10-30 05:00:00 UTC

Description John Broadhead 2001-09-28 22:35:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (Windows NT 5.0; U)

Description of problem:
If one has a rule with the --log-prefix parameter, everytime one saves the rule with iptables-save and then restores it with iptables-restore, 
the log prefix is wrapped in an extra layer of quotes.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.iptables -A firewall -j LOG --log-prefix Firewall: --log-level 6
2.iptables-save | iptables-restore ; iptables-save | iptables-restore ; iptables-save | iptables-restore
3.iptables-save


Actual Results:  Line for rule listed as:
-A firewall -j LOG --log-prefix """"Firewall:"""" --log-level 6


Expected Results:  Line should be listed as
-A firewall -j LOG --log-prefix Firewall: --log-level 6
or:
-A firewall -j LOG --log-prefix "Firewall:" --log-level 6
Depending on how quotes should be parsed


Additional info:
iptables-save and iptables-restore should understand the same language.

Comment 1 Michael Schwendt 2001-10-19 06:50:57 UTC
# iptables -F firewall
# iptables -X firewall
# iptables -N firewall
# iptables -A firewall -j LOG --log-prefix Firewall: --log-level 6
# iptables-save | iptables-restore ; iptables-save | iptables-restore ;
iptables-save | iptables-restore
# iptables-save

FWIW, I'm unable to reproduce this, although I can confirm that the code adds
quotes at the start and end of the prefix string if there are none. 

Which shell do you use? Do you have any special shell settings that
backslash-escape double-quotes maybe?

Comment 2 Michael Schwendt 2001-10-26 06:09:49 UTC
Is this a duplicate of bug #52550?

Comment 3 Bernhard Rosenkraenzer 2001-10-30 11:50:06 UTC
Not exactly, but it's fixed in 1.2.3-1 as well.



Note You need to log in before you can comment on or make changes to this bug.