Skip to content

Commit

Permalink
Stop setting promisc on bridge
Browse files Browse the repository at this point in the history
 * With hairpin mode the old workaround is now broken
 * Fixes bug 956474

Change-Id: Ib06baa5292ad59138041b2c641673a96263b5ff8
  • Loading branch information
vishvananda committed Mar 15, 2012
1 parent bb1e383 commit 682f612
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions nova/network/linux_net.py
Expand Up @@ -562,12 +562,6 @@ def initialize_gateway_device(dev, network_ref):
_execute('ip', '-f', 'inet6', 'addr',
'change', network_ref['cidr_v6'],
'dev', dev, run_as_root=True)
# NOTE(vish): If the public interface is the same as the
# bridge, then the bridge has to be in promiscuous
# to forward packets properly.
if(FLAGS.public_interface == dev):
_execute('ip', 'link', 'set',
'dev', dev, 'promisc', 'on', run_as_root=True)


def get_dhcp_leases(context, network_ref):
Expand Down
4 changes: 0 additions & 4 deletions nova/tests/test_linux_net.py
Expand Up @@ -504,7 +504,6 @@ def test_initialize_gateway_moves_wrong_ip(self):
'brd', '192.168.0.255', 'scope', 'global', 'dev', 'eth0'),
('ip', '-f', 'inet6', 'addr', 'change',
'2001:db8::/64', 'dev', 'eth0'),
('ip', 'link', 'set', 'dev', 'eth0', 'promisc', 'on'),
]
self._test_initialize_gateway(existing, expected)

Expand All @@ -530,7 +529,6 @@ def test_initialize_gateway_resets_route(self):
('route', 'add', 'default', 'gw', '192.68.0.1'),
('ip', '-f', 'inet6', 'addr', 'change',
'2001:db8::/64', 'dev', 'eth0'),
('ip', 'link', 'set', 'dev', 'eth0', 'promisc', 'on'),
]
self._test_initialize_gateway(existing, expected, routes)

Expand All @@ -546,7 +544,6 @@ def test_initialize_gateway_no_move_right_ip(self):
('ip', 'addr', 'show', 'dev', 'eth0', 'scope', 'global'),
('ip', '-f', 'inet6', 'addr', 'change',
'2001:db8::/64', 'dev', 'eth0'),
('ip', 'link', 'set', 'dev', 'eth0', 'promisc', 'on'),
]
self._test_initialize_gateway(existing, expected)

Expand All @@ -563,6 +560,5 @@ def test_initialize_gateway_add_if_blank(self):
'brd', '192.168.1.255', 'dev', 'eth0'),
('ip', '-f', 'inet6', 'addr', 'change',
'2001:db8::/64', 'dev', 'eth0'),
('ip', 'link', 'set', 'dev', 'eth0', 'promisc', 'on'),
]
self._test_initialize_gateway(existing, expected)

0 comments on commit 682f612

Please sign in to comment.