OpenStack Networking (Neutron)
Go to file
Kevin Benton ae9d1160bd Stop making IP-specific provider rules in SG code
Setting up rules to allow DHCPv6, DHCP, and RAs from specific
IP addresses based on Neutron resources has a few issues:

1. It violates separation of concerns. We are implementing logic to
   calculate where an IPv6 RA advertisement or DHCP advertisement
   should be coming from in the security group code. This code should
   not be trying to guess IPv6 LLAs, know about subnet modes, DHCP server
   implementations, or the type of L3 plugin being used. Currently all
   of these assumptions are baked into code that should only be
   filtering, which makes it very rigid and brittle when it comes to
   other implementations for DHCP and/or RAs.
2. It has scaling issues on large networks. Every time one of these
   provider rules is updated, it triggers every L2 agent to refresh
   all of the security group rules for ports in that network, which puts
   significant load on the server.
3. It's main purpose: preventing spoofing of RA[1,2] and DHCP packets,
   has long been superceded by preventing VMs from acting as DHCP/RA
   servers[3][4].

This patch completely removes all of this logic and just returns
static provider rules to the agents that allow all DHCP server
and RA traffic ingress to the client. This addresses the issues
highlighted above since the code is significantly simplified and
the provider rules don't require refreshes on the agents.

Now that the provider rules never change, the RPC notification
listener on the agent-side for 'notify_provider_updated' is now
just a NOOP that doesn't trigger any refreshes. The notification
was left in place on the server side for older version agents
that have stale IP-specific provider rules. The entire notification
can be removed in the future.

The one open concern with this approach is that VMs will now be
able to receive DHCP offers from other DHCP servers on the same
network that aren't being filtered (e.g. a VM with port security
disabled or another device on a provider network). In order to
address this for DHCP, this patch adds two rules that only allow
DHCP offers targeted to either the broadcast or the correct client
IP. This prevents incorrect offers from ever reaching the client.
For RAs, this patch just allows all RAs so we may pick up
advertisements from other v6 routers attached to a network;
however, the instance won't actually be allowed to use bad addresses.

1. https://bugs.launchpad.net/neutron/+bug/1262759
2. I1d5c7aaa8e4cf057204eb746c0faab2c70409a94
3. Ice1c9dd349864da28806c5053e38ef86f43b7771
4. https://git.openstack.org/cgit/openstack/neutron/tree/
   neutron/agent/linux/iptables_firewall.py
   ?h=521b1074f17574a5234843bce68f3810995e0e1d#n475
Closes-Bug: #1653830
Closes-Bug: #1663077
Change-Id: Ibfbf011284cbde396f74db9d982993f994082731
2017-03-01 06:11:44 -08:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
bin XenAPI: add support for conntrack with XenServer 2016-09-23 02:34:25 +00:00
devstack Use gate_hook to enable q-trunk for rally. 2017-01-05 23:31:10 +09:00
doc Fix error in openvswitch firewall doc 2017-02-07 17:29:33 +08:00
etc Merge "Linux Bridge: driver support for QoS egress minimum bandwidth" 2017-01-25 10:13:03 +00:00
neutron Stop making IP-specific provider rules in SG code 2017-03-01 06:11:44 -08:00
rally-jobs rally trunk port list 2016-12-10 06:15:34 -08:00
releasenotes Merge "Terminate macvtap agent when physical_interface_mapping config not present" 2017-02-06 11:17:03 +00:00
tools Merge "configure_for_func_testing.sh: Remove neutron-legacy inclusion" 2017-02-03 21:02:24 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore Automatically generate neutron core configuration files 2015-11-27 15:22:59 +00:00
.gitreview Fix .gitreview to not point at a branch 2015-08-17 13:51:51 -06:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Remove last vestiges of oslo-incubator 2016-11-04 20:49:13 -04:00
.testr.conf Allow more time for DB migration tests 2016-09-21 20:54:41 -04:00
CONTRIBUTING.rst Make crystal clear how to contribute/approach the neutron community 2016-10-28 11:49:44 -07:00
HACKING.rst Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016-11-22 02:15:19 +00:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
README.rst Show team and repo badges on README 2016-11-25 15:35:21 +01:00
TESTING.rst Merge "TrivialFix: Modify the spelling mistake" 2017-02-03 09:59:05 +00:00
babel.cfg Use babel to generate translation file 2013-01-24 00:20:32 +08:00
bindep.txt Fix periodic jobs: Add databases to bindep.txt 2016-10-09 06:31:00 +02:00
requirements.txt Updated from global requirements 2017-02-03 00:19:33 +00:00
run_tests.sh Deprecate run_tests.sh 2016-11-08 03:50:20 +00:00
setup.cfg Merge "Remove python 3.4 support" 2017-02-08 05:09:55 +00:00
setup.py Updated from global requirements 2015-09-21 18:56:49 +00:00
test-requirements.txt Updated from global requirements 2016-12-28 09:11:12 +00:00
tox.ini Remove python 3.4 support 2017-01-08 05:37:48 -08:00

README.rst

Team and repository tags

image

Welcome!

To learn more about neutron:

Get in touch via email. Use [Neutron] in your subject.

To learn how to contribute:

CONTRIBUTING.rst