Merge "Fix lost connection when create security group log"
This commit is contained in:
commit
4d767a7876
@ -342,6 +342,9 @@ class OVSFirewallLoggingDriver(log_ext.LoggingDriver):
|
||||
# log first accepted packet
|
||||
flow['table'] = OVS_FW_TO_LOG_TABLES[flow['table']]
|
||||
flow['actions'] = 'controller'
|
||||
# forward egress accepted packet and log
|
||||
if flow['table'] == ovs_consts.ACCEPTED_EGRESS_TRAFFIC_TABLE:
|
||||
flow['actions'] = 'normal,controller'
|
||||
self._add_flow(**flow)
|
||||
|
||||
def _add_flow(self, **kwargs):
|
||||
|
@ -103,7 +103,8 @@ class TestLoggingExtension(LoggingExtensionTestFramework):
|
||||
def _is_log_flow_set(self, table):
|
||||
flows = self.log_driver.int_br.br.dump_flows_for_table(table)
|
||||
pattern = re.compile(
|
||||
r"^.* table=%s.* actions=CONTROLLER:65535" % table
|
||||
r"^.* table=%s.* "
|
||||
r"actions=(NORMAL,CONTROLLER:65535|CONTROLLER:65535)" % table
|
||||
)
|
||||
for flow in flows.splitlines():
|
||||
if pattern.match(flow.strip()):
|
||||
|
@ -181,7 +181,7 @@ class TestOVSFirewallLoggingDriver(base.BaseTestCase):
|
||||
tcp_dst='0x007b'),
|
||||
# log egress tcp6
|
||||
mock.call(
|
||||
actions='controller',
|
||||
actions='normal,controller',
|
||||
cookie=accept_cookie.id,
|
||||
reg5=self.port_ofport,
|
||||
dl_type="0x{:04x}".format(n_const.ETHERTYPE_IPV6),
|
||||
@ -190,7 +190,7 @@ class TestOVSFirewallLoggingDriver(base.BaseTestCase):
|
||||
table=ovs_consts.ACCEPTED_EGRESS_TRAFFIC_TABLE),
|
||||
# log egress udp
|
||||
mock.call(
|
||||
actions='controller',
|
||||
actions='normal,controller',
|
||||
cookie=accept_cookie.id,
|
||||
reg5=self.port_ofport,
|
||||
dl_type="0x{:04x}".format(n_const.ETHERTYPE_IP),
|
||||
|
Loading…
x
Reference in New Issue
Block a user