Bug 90600 - /etc/init.d/ip6tables does not clear tables
/etc/init.d/ip6tables does not clear tables
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: iptables (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-10 08:48 EDT by Martijn Lievaart
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version: 1.2.8-8.80.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-22 06:41:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martijn Lievaart 2003-05-10 08:48:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030211

Description of problem:
/etc/init.d/ip6tables uses the wrong /proc entry to clear the tables. This fixes
the bug:

[root@ma init.d]# diff -u ip6tables*
--- ip6tables   Wed May  7 00:46:21 2003
+++ ip6tables~  Wed Oct 23 21:47:29 2002
@@ -51,7 +51,7 @@
        if [ -f $IPTABLES_CONFIG ]; then
            # If we don't clear these first, we might be adding to
            #  pre-existing rules.
-           chains=`cat /proc/net/ip6_tables_names 2>/dev/null`
+           chains=`cat /proc/net/ip_tables_names 2>/dev/null`
            echo -n $"Flushing all current rules and user defined chains:"
             let ret=0
             for i in $chains; do ip6tables -t $i -F; let ret+=$?; done
[root@ma init.d]#


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


How reproducible:
Always

Steps to Reproduce:
1. Set up some ipv4 and ipv6 iptables rules. Use ipv4 tables that don't exist in
the ipv6 rules.
2. Execute ip6-tables-save to save the rules
3. Execute service ip6tables start. This gives the error.
    

Actual Results:  [root@ma init.d]# ./ip6tables start
Flushing all current rules and user defined chains:ip6tables v1.2.7a: can't
initialize ip6tables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
                                                           [FAILED]
Clearing all current rules and user defined chains:ip6tables v1.2.7a: can't
initialize ip6tables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
                                                           [FAILED]
ip6tables v1.2.7a: can't initialize ip6tables table `nat': Table does not exist
(do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Applying ip6tables firewall rules:                         [  OK  ]
[root@ma init.d]#


Expected Results:  Old rules flushed and saved rules correctly restored.

Additional info: Also sent previously to bero@redhat.com
Comment 1 Pekka Savola 2003-07-22 06:37:35 EDT
Wrong package, moving to iptables.

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