logparser: store network-related params if an event looks like network

Network events can come with an operation= that looks like a file event.
Nevertheless, if the event has a typical network parameter (like
net_protocol) set, make sure to store the network-related flags in ev.

This fixes the test failure introduced in my last commit.


Acked-by: Kshitij Gupta <kgupta8592@gmail.com> for trunk, 2.10 and 2.9
This commit is contained in:
Christian Boltz 2016-07-31 17:15:42 +02:00
parent 2a929f3f1c
commit 119522307f

View file

@ -133,7 +133,7 @@ class ReadLog:
ev['denied_mask'] = event.denied_mask
ev['request_mask'] = event.requested_mask
ev['magic_token'] = event.magic_token
if ev['operation'] and self.op_type(ev['operation']) == 'net':
if ev['operation'] and (self.op_type(ev['operation']) == 'net' or event.net_protocol):
ev['family'] = event.net_family
ev['protocol'] = event.net_protocol
ev['sock_type'] = event.net_sock_type