diff --git a/eBPF/response/ebpf/response.c b/eBPF/response/ebpf/response.c index e6c8786..d9ec759 100644 --- a/eBPF/response/ebpf/response.c +++ b/eBPF/response/ebpf/response.c @@ -4,7 +4,6 @@ #include #include #include -#include #pragma pack(1) @@ -102,8 +101,8 @@ static inline int swap_udp(struct __sk_buff *skb) { /* We'll store the mac addresses (L2) */ __u8 src_mac[ETH_ALEN]; __u8 dst_mac[ETH_ALEN]; - memcpy(src_mac, eth->h_source, ETH_ALEN); - memcpy(dst_mac, eth->h_dest, ETH_ALEN); + __builtin_memcpy(src_mac, eth->h_source, ETH_ALEN); + __builtin_memcpy(dst_mac, eth->h_dest, ETH_ALEN); /* ip addresses (L3) */ __be32 src_ip = iph->saddr; @@ -161,4 +160,4 @@ SEC("tc_in") int tc_ingress(struct __sk_buff *skb) { return swap_udp(skb); } SEC("tc_egress") -int tc_egress_(struct __sk_buff *skb) { return swap_udp(skb); } \ No newline at end of file +int tc_egress_(struct __sk_buff *skb) { return swap_udp(skb); }