Skip to content

Instantly share code, notes, and snippets.

@txomon
Created January 15, 2015 20:05
Show Gist options
  • Save txomon/bd3e63fd8b556e18c108 to your computer and use it in GitHub Desktop.
Save txomon/bd3e63fd8b556e18c108 to your computer and use it in GitHub Desktop.
Dirty neutron patch for enabling DHCP server when port isn't in security groups
diff --git a/neutron/agent/linux/iptables_firewall.py b/neutron/agent/linux/iptables_firewall.py
index 33793a0..5bb570e 100644
--- a/neutron/agent/linux/iptables_firewall.py
+++ b/neutron/agent/linux/iptables_firewall.py
@@ -343,7 +343,7 @@ class IptablesFirewallDriver(firewall.FirewallDriver):
security_group_rules)
ipv4_iptables_rule = []
ipv6_iptables_rule = []
- if direction == EGRESS_DIRECTION:
+ if direction == EGRESS_DIRECTION and port.get('security_groups'):
self._spoofing_rule(port,
ipv4_iptables_rule,
ipv6_iptables_rule)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment