mirror of
https://github.com/h3xduck/TripleCross.git
synced 2026-01-10 10:03:07 +08:00
Completed detachment of probes, enabling to attach and detach at will. Work needs to be done with xdp tho
This commit is contained in:
@@ -46,9 +46,10 @@ int attach_xdp_all(struct xdp_filter_bpf *skel, __u32 ifindex, __u32 flags){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int detach_xdp_all(__u32 fd, __u32 ifindex, __u32 flags){
|
||||
int detach_xdp_all(__u32 ifindex, __u32 fd, __u32 flags){
|
||||
int err = bpf_set_link_xdp_fd(ifindex, fd, flags);
|
||||
if(err<0){
|
||||
perror("j");
|
||||
fprintf(stderr, "Failed to detach XDP program\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user