iptables manager does not honor top param of add_rule

Bug #1194389 reported by Sylvain Afchain
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Sylvain Afchain

Bug Description

When I add some rules with add_rule method of IptablesTable class, sometimes the top parameter is not always honored.

to reproduce:

self.iptables.ipv4['filter'].add_chain('filter')
self.iptables.ipv4['filter'].add_rule('filter',
                                      '-s 0/0 -d 192.168.0.2 -j'
                                      ' RETURN',
                                      top=True)
self.iptables.ipv4['filter'].add_rule('filter',
                                      '-s 0/0 -d 192.168.0.3 -j'
                                      ' RETURN',
                                      top=False)
self.iptables.ipv4['filter'].add_rule('filter',
                                      '-s 0/0 -d 192.168.0.4 -j'
                                      ' RETURN',
                                      top=True)
self.iptables.apply()

the good order should be:

-s 0/0 -d 192.168.0.2 -j RETURN
-s 0/0 -d 192.168.0.4 -j RETURN
-s 0/0 -d 192.168.0.3 -j RETURN

and I get:

-s 0/0 -d 192.168.0.2 -j RETURN
-s 0/0 -d 192.168.0.3 -j RETURN
-s 0/0 -d 192.168.0.4 -j RETURN

Tags: l3-ipam-dhcp
description: updated
Changed in quantum:
assignee: nobody → Sylvain Afchain (sylvain-afchain)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/34569

Changed in quantum:
status: New → In Progress
Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
importance: Undecided → High
milestone: none → havana-rc1
tags: added: iptables
tags: added: l3-ipam-dhcp
removed: iptables
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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