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

socket doesn't always have valid if_index so we can't use it as key (#153)


Signed-off-by: default avatarmsherif1234 <mmahmoud@redhat.com>
parent 04f712f0
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,6 @@ static inline void find_or_create_dns_flow(flow_id *id, struct dns_header *dns, ...@@ -42,7 +42,6 @@ static inline void find_or_create_dns_flow(flow_id *id, struct dns_header *dns,
static inline void fill_dns_id (flow_id *id, dns_flow_id *dns_flow, u16 dns_id, bool reverse) { static inline void fill_dns_id (flow_id *id, dns_flow_id *dns_flow, u16 dns_id, bool reverse) {
dns_flow->id = dns_id; dns_flow->id = dns_id;
dns_flow->if_index = id->if_index;
dns_flow->protocol = id->transport_protocol; dns_flow->protocol = id->transport_protocol;
if (reverse) { if (reverse) {
__builtin_memcpy(dns_flow->src_ip, id->dst_ip, IP_MAX_LEN); __builtin_memcpy(dns_flow->src_ip, id->dst_ip, IP_MAX_LEN);
......
...@@ -164,7 +164,6 @@ typedef struct dns_flow_id_t { ...@@ -164,7 +164,6 @@ typedef struct dns_flow_id_t {
u8 src_ip[IP_MAX_LEN]; u8 src_ip[IP_MAX_LEN];
u8 dst_ip[IP_MAX_LEN]; u8 dst_ip[IP_MAX_LEN];
u16 id; u16 id;
u32 if_index;
u8 protocol; u8 protocol;
} __attribute__((packed)) dns_flow_id; } __attribute__((packed)) dns_flow_id;
......
...@@ -19,7 +19,6 @@ type BpfDnsFlowId struct { ...@@ -19,7 +19,6 @@ type BpfDnsFlowId struct {
SrcIp [16]uint8 SrcIp [16]uint8
DstIp [16]uint8 DstIp [16]uint8
Id uint16 Id uint16
IfIndex uint32
Protocol uint8 Protocol uint8
} }
......
No preview for this file type
...@@ -19,7 +19,6 @@ type BpfDnsFlowId struct { ...@@ -19,7 +19,6 @@ type BpfDnsFlowId struct {
SrcIp [16]uint8 SrcIp [16]uint8
DstIp [16]uint8 DstIp [16]uint8
Id uint16 Id uint16
IfIndex uint32
Protocol uint8 Protocol uint8
} }
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment