Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
fixed loopback pass all by default
Browse files Browse the repository at this point in the history
  • Loading branch information
r-caamano committed Feb 9, 2024
1 parent 304bce1 commit 5276a21
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

---
# [0.5.9] - 2024-02-09

###

- Fixed an issue where if tc filter is applied to the loopback interface traffic is dropped if it does not match
a filter. The correct action is to pass all traffic to the loopback unless there is a rule explicitly redirecting
the traffic to either a tproxy port or ziti(tun) interface.


# [0.5.7] - 2024-01-21

Expand Down
2 changes: 1 addition & 1 deletion src/zfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ char *tc_interface;
char *log_file_name;
char *object_file;
char *direction_string;
const char *argp_program_version = "0.5.7";
const char *argp_program_version = "0.5.9";
struct ring_buffer *ring_buffer;

__u8 if_list[MAX_IF_LIST_ENTRIES];
Expand Down
4 changes: 4 additions & 0 deletions src/zfw_tc_ingress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,10 @@ int bpf_sk_splice4(struct __sk_buff *skb){
if(dmask == 0x00000000){
if((tracked_key_data->count > 0)){
return TC_ACT_PIPE;
}else{
if(skb->ingress_ifindex == 1){
return TC_ACT_OK;
}
}
}
iterate_masks(&dmask, &dexponent);
Expand Down

0 comments on commit 5276a21

Please sign in to comment.