neutron/neutron/agent/linux
LIU Yulong bd6203b2c7 [Security] fix allowed-address-pair 0.0.0.0/0 issue
When add allowed-address-pair 0.0.0.0/0 to one port, it will
unexpectedly open all others' protocol under same security
group. IPv6 has the same problem.

The root cause is the openflow rules calculation of the
security group, it will unexpectedly allow all IP(4&6)
traffic to get through.

For openvswitch openflow firewall, this patch adds a source
mac address match for the allowed-address-pair which has
prefix lenght 0, that means all ethernet packets from this
mac will be accepted. It exactly will meet the request of
accepting any IP address from the configured VM.

Test result shows that the remote security group and
allowed address pair works:
1. Port has 0.0.0.0/0 allowed-address-pair clould send any
   IP (src) packet out.
2. Port has x.x.x.x/y allowed-address-pair could be accepted
   for those VMs under same security group.
3. Ports under same network can reach each other (remote
   security group).
4. Protocol port number could be accessed only when there
   has related rule.

Conflicts:
    neutron/tests/unit/agent/linux/openvswitch_firewall/test_rules.py

Closes-bug: #1867119
Change-Id: I2e3aa7c400d7bb17cc117b65faaa160b41013dde
(cherry picked from commit 00298fe6e8)
2020-07-31 13:31:18 +02:00
..
openvswitch_firewall [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 13:31:18 +02:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
async_process.py Add kill_timeout to AsyncProcess 2019-01-04 10:46:44 +00:00
bridge_lib.py LinuxBridge: Use ifindex for logical 'timestamp' 2016-09-14 17:02:46 +00:00
daemon.py Remove argument "watch_log = " 2017-10-13 09:42:48 +08:00
dhcp.py Check dnsmasq process is active when spawned 2020-04-07 20:10:15 +00:00
dibbler.py use PROVISIONAL_IPV6_PD_PREFIX from neutron-lib 2017-11-14 12:26:43 -07:00
external_process.py Check dnsmasq process is active when spawned 2020-04-07 20:10:15 +00:00
interface.py Allow usage of legacy 3rd-party interface drivers 2020-05-21 08:43:44 +00:00
ip_conntrack.py Remove race and simplify conntrack state management 2018-03-26 17:34:59 +00:00
ip_lib.py Switch create/delete interfaces to pyroute2 2020-04-27 21:41:02 +02:00
ip_link_support.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
ip_monitor.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
ipset_manager.py [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 13:31:18 +02:00
iptables_comments.py Iptables firewall driver adds forward rules for trusted ports 2018-03-25 09:56:10 +00:00
iptables_firewall.py [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 13:31:18 +02:00
iptables_manager.py Packets getting lost during SNAT with too many connections 2019-06-04 23:23:43 +00:00
keepalived.py Do not link up HA router gateway in backup node 2020-04-23 21:45:06 +00:00
l3_tc_lib.py Support iproute2 4.15 in l3_tc_lib 2020-04-14 07:40:51 +00:00
ovsdb_monitor.py ovsdb monitor: do not die on ovsdb-client stderr output 2018-09-17 08:18:11 +00:00
pd.py use PROVISIONAL_IPV6_PD_PREFIX from neutron-lib 2017-11-14 12:26:43 -07:00
pd_driver.py use PROVISIONAL_IPV6_PD_PREFIX from neutron-lib 2017-11-14 12:26:43 -07:00
polling.py Support ovsdb-client monitor with remote connection 2017-01-17 06:00:58 -08:00
ra.py Dropping radvd process privileges 2018-06-26 17:48:10 +00:00
tc_lib.py Fix ingress bw limit for OVS DPDK ports 2018-01-15 13:19:14 +00:00
utils.py Check if process' cmdline is "space separarated" 2019-03-27 09:44:07 +00:00
xenapi_root_helper.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00