The full patch would look like this:
--- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -1631,10 +1631,14 @@ def remove_ebtables_rules(rules, table='filter'): def isolate_dhcp_address(interface, address): # block arp traffic to address across the interface rules = [] + rules.append('INPUT -p TCP -i %s --dst %s --ip-destination-port 8776 -j ALLOW' + % (interface, address)) rules.append('INPUT -p ARP -i %s --arp-ip-dst %s -j DROP' % (interface, address)) rules.append('OUTPUT -p ARP -o %s --arp-ip-src %s -j DROP' % (interface, address)) + rules.append('INPUT -i %s --dst %s -j DROP' + % (interface, address)) # NOTE(vish): the above is not possible with iptables/arptables ensure_ebtables_rules(rules) # block dhcp broadcast traffic across the interface @@ -1663,10 +1667,14 @@ def isolate_dhcp_address(interface, address): def remove_isolate_dhcp_address(interface, address): # block arp traffic to address across the interface rules = [] + rules.append('INPUT -p TCP -i %s --dst %s --ip-destination-port 8776 -j ALLOW' + % (interface, address)) rules.append('INPUT -p ARP -i %s --arp-ip-dst %s -j DROP' % (interface, address)) rules.append('OUTPUT -p ARP -o %s --arp-ip-src %s -j DROP' % (interface, address)) + rules.append('INPUT -i %s --dst %s -j DROP' + % (interface, address)) remove_ebtables_rules(rules) # NOTE(vish): the above is not possible with iptables/arptables # block dhcp broadcast traffic across the interface
The full patch would look like this:
--- a/nova/ network/ linux_net. py network/ linux_net. py ebtables_ rules(rules, table='filter'): dhcp_address( interface, address): n-port 8776 -j ALLOW' append( 'INPUT -p ARP -i %s --arp-ip-dst %s -j DROP' append( 'OUTPUT -p ARP -o %s --arp-ip-src %s -j DROP' ebtables_ rules(rules) dhcp_address( interface, address): isolate_ dhcp_address( interface, address): n-port 8776 -j ALLOW' append( 'INPUT -p ARP -i %s --arp-ip-dst %s -j DROP' append( 'OUTPUT -p ARP -o %s --arp-ip-src %s -j DROP' ebtables_ rules(rules)
+++ b/nova/
@@ -1631,10 +1631,14 @@ def remove_
def isolate_
# block arp traffic to address across the interface
rules = []
+ rules.append('INPUT -p TCP -i %s --dst %s --ip-destinatio
+ % (interface, address))
rules.
% (interface, address))
rules.
% (interface, address))
+ rules.append('INPUT -i %s --dst %s -j DROP'
+ % (interface, address))
# NOTE(vish): the above is not possible with iptables/arptables
ensure_
# block dhcp broadcast traffic across the interface
@@ -1663,10 +1667,14 @@ def isolate_
def remove_
# block arp traffic to address across the interface
rules = []
+ rules.append('INPUT -p TCP -i %s --dst %s --ip-destinatio
+ % (interface, address))
rules.
% (interface, address))
rules.
% (interface, address))
+ rules.append('INPUT -i %s --dst %s -j DROP'
+ % (interface, address))
remove_
# NOTE(vish): the above is not possible with iptables/arptables
# block dhcp broadcast traffic across the interface