Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: GPL-2.0
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
int redirect_ifindex = 1;
__u64 verdict_calls = 0;
__u64 helper_calls = 0;
SEC("tc")
int qevent_redirect_verdict(struct __sk_buff *skb)
{
__sync_fetch_and_add(&verdict_calls, 1);
return TCX_REDIRECT;
}
SEC("tc")
int qevent_redirect_helper(struct __sk_buff *skb)
{
__sync_fetch_and_add(&helper_calls, 1);
return bpf_redirect(redirect_ifindex, 0);
}
char _license[] SEC("license") = "GPL";