Skip to content
Snippets Groups Projects
Unverified Commit d7243ea9 authored by Mohamed S. Mahmoud's avatar Mohamed S. Mahmoud Committed by GitHub
Browse files

Need to differentiate between cached dns response vs incomplete ones [BP] (#402)


* Need to differentiate between cached dns response vs incomplete ones

Signed-off-by: default avatarMohamed Mahmoud <mmahmoud@redhat.com>
(cherry picked from commit 1f10618b0359889c854bd29c1edd712b05de0b12)
Signed-off-by: default avatarMohamed Mahmoud <mmahmoud@redhat.com>

* fix issue with protocol matching

Signed-off-by: default avatarMohamed Mahmoud <mmahmoud@redhat.com>

---------

Signed-off-by: default avatarMohamed Mahmoud <mmahmoud@redhat.com>
parent 00b0d22c
Branches
Tags v2.39.1
No related merge requests found
...@@ -140,6 +140,9 @@ static __always_inline int do_flow_filter_lookup(flow_id *id, struct filter_key_ ...@@ -140,6 +140,9 @@ static __always_inline int do_flow_filter_lookup(flow_id *id, struct filter_key_
} }
break; break;
} }
} else {
result = 0;
goto end;
} }
if (!is_zero_ip(rule->ip, len)) { if (!is_zero_ip(rule->ip, len)) {
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -88,6 +88,7 @@ func (c *deduperCache) checkDupe(r *Record, justMark, mergeDup bool, fwd *[]*Rec ...@@ -88,6 +88,7 @@ func (c *deduperCache) checkDupe(r *Record, justMark, mergeDup bool, fwd *[]*Rec
fEntry.dnsRecord.Flags = r.Metrics.DnsRecord.Flags fEntry.dnsRecord.Flags = r.Metrics.DnsRecord.Flags
fEntry.dnsRecord.Id = r.Metrics.DnsRecord.Id fEntry.dnsRecord.Id = r.Metrics.DnsRecord.Id
fEntry.dnsRecord.Latency = r.Metrics.DnsRecord.Latency fEntry.dnsRecord.Latency = r.Metrics.DnsRecord.Latency
fEntry.dnsRecord.Errno = r.Metrics.DnsRecord.Errno
} }
// If the new flow has flowRTT then enrich the flow in the case with the same RTT and mark it duplicate // If the new flow has flowRTT then enrich the flow in the case with the same RTT and mark it duplicate
if r.Metrics.FlowRtt != 0 && *fEntry.flowRTT == 0 { if r.Metrics.FlowRtt != 0 && *fEntry.flowRTT == 0 {
......
...@@ -105,7 +105,6 @@ func Accumulate(r *ebpf.BpfFlowMetrics, src *ebpf.BpfFlowMetrics) { ...@@ -105,7 +105,6 @@ func Accumulate(r *ebpf.BpfFlowMetrics, src *ebpf.BpfFlowMetrics) {
r.DnsRecord.Flags |= src.DnsRecord.Flags r.DnsRecord.Flags |= src.DnsRecord.Flags
if src.DnsRecord.Id != 0 { if src.DnsRecord.Id != 0 {
r.DnsRecord.Id = src.DnsRecord.Id r.DnsRecord.Id = src.DnsRecord.Id
r.DnsRecord.Errno = src.DnsRecord.Errno
} }
if r.DnsRecord.Errno != src.DnsRecord.Errno { if r.DnsRecord.Errno != src.DnsRecord.Errno {
r.DnsRecord.Errno = src.DnsRecord.Errno r.DnsRecord.Errno = src.DnsRecord.Errno
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment