neutron/neutron
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
..
agent [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 13:31:18 +02:00
api [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 13:31:18 +02:00
cmd Secure dnsmasq process against external abuse 2019-01-25 13:58:19 +00:00
common Add trunk subports to be one of dvr serviced device owners 2020-04-06 11:38:08 +00:00
conf Add config option ``http_retries`` 2020-07-09 10:18:46 +00:00
core_extensions use qos constants from neutron-lib 2017-10-26 19:57:19 +00:00
db [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 13:31:18 +02:00
debug Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
extensions Improve invalid port ranges error message 2019-03-21 10:18:01 -04:00
hacking hacking: Remove dead code 2017-07-19 13:43:44 +02:00
ipam Update the processing of assigned addresses when assigning addresses 2020-06-19 10:10:41 +00:00
locale Imported Translations from Zanata 2018-03-14 06:20:49 +00:00
notifiers Add config option ``http_retries`` 2020-07-09 10:18:46 +00:00
objects Improve VLAN allocations synchronization 2020-04-23 16:15:17 +00:00
pecan_wsgi Set DB retry for quota_enforcement pecan_wsgi hook 2019-12-16 11:16:23 +00:00
plugins Ensure drop flows on br-int at agent startup for DVR too 2020-07-22 08:03:21 +00:00
privileged Merge "Switch create/delete interfaces to pyroute2" into stable/queens 2020-04-28 17:18:33 +00:00
quota Set DB retry for quota_enforcement pecan_wsgi hook 2019-12-16 11:16:23 +00:00
scheduler Fetch specific columns rather than full ORM entities 2018-09-27 19:12:37 +02:00
server Re-use existing ProcessLauncher from wsgi in RPC workers 2020-02-20 09:39:20 +00:00
services Wait before deleting trunk bridges for DPDK vhu 2020-04-03 21:12:10 +00:00
tests [Security] fix allowed-address-pair 0.0.0.0/0 issue 2020-07-31 13:31:18 +02:00
__init__.py
_i18n.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
auth.py Use oslo.context class method to construct context object 2017-03-23 09:02:46 +00:00
manager.py Do not load default service plugins if core plugin is not DB based 2017-11-09 20:34:52 +00:00
neutron_plugin_base_v2.py Do not load default service plugins if core plugin is not DB based 2017-11-09 20:34:52 +00:00
opts.py Merge "Remove deprecated cache_url" 2018-01-03 06:35:59 +00:00
policy.py Treat networks shared by RBAC in same way as shared with all tenants 2019-06-28 06:05:44 +00:00
service.py Re-use existing ProcessLauncher from wsgi in RPC workers 2020-02-20 09:39:20 +00:00
version.py
worker.py replace WorkerSupportServiceMixin with neutron-lib's WorkerBase 2017-06-14 06:56:48 -06:00
wsgi.py Re-use existing ProcessLauncher from wsgi in RPC workers 2020-02-20 09:39:20 +00:00