Skip to content

Commit 7eb40e4

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Allow operator to disable usage of random-fully" into stable/yoga
2 parents 602c102 + fa77abb commit 7eb40e4

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

neutron/agent/linux/iptables_manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,10 @@ def random_fully(self):
497497
version = self._get_version()
498498
self.__class__._random_fully = utils.is_version_greater_equal(
499499
version, n_const.IPTABLES_RANDOM_FULLY_VERSION)
500+
501+
self._random_fully = self._random_fully and \
502+
cfg.CONF.AGENT.use_random_fully
503+
500504
return self._random_fully
501505

502506
@property

neutron/conf/agent/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@
135135
"of iptables-save. This option should not be turned "
136136
"on for production systems because it imposes a "
137137
"performance penalty.")),
138+
cfg.BoolOpt('use_random_fully',
139+
default=True,
140+
help=_("Use random-fully in SNAT masquerade rules.")),
138141
]
139142

140143
PROCESS_MONITOR_OPTS = [
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
features:
3+
- |
4+
Add ``use_random_fully`` setting to allow an operator to disable
5+
the iptables random-fully property on an iptable rules.
6+
issues:
7+
- |
8+
If the ``use_random_fully`` setting is disabled, it will prevent
9+
random fully from being used and if there're 2 guests in different
10+
networks using the same source_ip and source_port and they try to
11+
reach the same dest_ip and dest_port, packets might be dropped in
12+
the kernel do to the racy tuple generation . Disabling this
13+
setting should only be done if source_port is really important such
14+
as in network firewall ACLs and that the source_ip are never repeating
15+
within the platform.

0 commit comments

Comments
 (0)