Skip to content

Commit

Permalink
Memset dns id to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Dec 18, 2024
1 parent 8c14a3f commit d16250a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bpf/dns_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static __always_inline int track_dns_packet(struct __sk_buff *skb, pkt_info *pkt
if (pkt->id->dst_port == dns_port || pkt->id->src_port == dns_port ||
pkt->id->dst_port == DNS_DEFAULT_PORT || pkt->id->src_port == DNS_DEFAULT_PORT) {
dns_flow_id dns_req;
__builtin_memset(&dns_req, 0, sizeof(dns_req));

u8 len = calc_dns_header_offset(pkt, data_end);
if (!len) {
Expand Down
Binary file modified pkg/ebpf/bpf_arm64_bpfel.o
Binary file not shown.
Binary file modified pkg/ebpf/bpf_powerpc_bpfel.o
Binary file not shown.
Binary file modified pkg/ebpf/bpf_s390_bpfeb.o
Binary file not shown.
Binary file modified pkg/ebpf/bpf_x86_bpfel.o
Binary file not shown.

0 comments on commit d16250a

Please sign in to comment.