flushing nat table fails

Bug #1019857 reported by Carsten Spiess on 2012-07-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iptables-persistent (Debian)
Fix Released
iptables-persistent (Ubuntu)
Micah Gersten

Bug Description

Flushing of tables other than filter fails.
Probably caused by wrong $(</proc...) construct.

When changing the line
  for table in $(</proc/net/ip_tables_names)
 for table in $(cat /proc/net/ip_tables_names)

(same for ip6) it works on my installation.

Andreas Rütten (aruetten) wrote :

This is a known bashism:

# checkbashisms iptables-persistent.init
possible bashism in iptables-persistent.init line 95 ('$(< foo)' should be '$(cat foo)'):
                for table in $(</proc/net/ip_tables_names)
possible bashism in iptables-persistent.init line 112 ('$(< foo)' should be '$(cat foo)'):
                for table in $(</proc/net/ip6_tables_names)

Andreas Rütten (aruetten) wrote :
Changed in iptables-persistent (Ubuntu):
status: New → Confirmed
Changed in iptables-persistent (Debian):
status: New → Confirmed
importance: Undecided → Unknown
status: Confirmed → Unknown

The attachment "0001-Fix-bashism-in-the-flush_rules-function.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in iptables-persistent (Debian):
status: Unknown → New
Micah Gersten (micahg) wrote :

Patch looks good, uploading, thanks!

Changed in iptables-persistent (Ubuntu):
assignee: nobody → Micah Gersten (micahg)
importance: Undecided → Low
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iptables-persistent - 0.5.6ubuntu1

iptables-persistent (0.5.6ubuntu1) quantal; urgency=low

  * Sync on Debian (Fixes LP: #1002078)
  * fix LP: #1019857 - flushing nat table fails; Apply patch given in the bug
    by Andreas Rütten, thanks! (Closes: #683789)

iptables-persistent (0.5.6) unstable; urgency=low

  * [6b6358] Instead of checking on modules, test a working iptables more
    directly (Closes: #679840)
  * [1db63c] Remove dependency on kmod
 -- Micah Gersten <email address hidden> Thu, 23 Aug 2012 22:50:38 -0500

Changed in iptables-persistent (Ubuntu):
status: In Progress → Fix Released
Changed in iptables-persistent (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.