Skip to content

Commit

Permalink
Increases high memory limit on ziti-wrapper.service and some minor ch…
Browse files Browse the repository at this point in the history
…anges to zfw_tc_ingress.c
  • Loading branch information
r-caamano committed May 23, 2024
1 parent df98415 commit 2fab70c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion files/services/ziti-wrapper.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=ziti-edge-tunnel.service
[Service]
User=root
MemoryAccounting=yes
MemoryHigh=50M
MemoryHigh=90%
EnvironmentFile=/opt/openziti/etc/ziti-edge-tunnel.env
ExecStartPre=/opt/openziti/bin/start_ebpf_tunnel.py
ExecStart=/opt/openziti/bin/zfw_tunnwrapper
Expand Down
8 changes: 2 additions & 6 deletions src/zfw_tc_ingress.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,7 @@ static inline struct if_list_extension_mapping *get_if_list_ext_mapping(struct p
static inline struct range_mapping *get_range_ports(struct port_extension_key key){
struct range_mapping *hp;
hp = bpf_map_lookup_elem(&range_map, &key);
if(hp){
return hp;
}else{
return NULL;
}
return hp;
}

static inline void del_tcp(struct tuple_key key){
Expand Down Expand Up @@ -1567,7 +1563,7 @@ int bpf_sk_splice5(struct __sk_buff *skb){
max_entries = MAX_INDEX_ENTRIES;
}
for (int index = 0; index < max_entries; index++){
int port_key = tproxy->index_table[index];
__u16 port_key = tproxy->index_table[index];
struct port_extension_key ext_key = {key.dst_ip, key.src_ip, port_key, key.dprefix_len, key.sprefix_len, protocol, 0};
struct range_mapping *range = get_range_ports(ext_key);
//check if there is a udp or tcp destination port match
Expand Down

0 comments on commit 2fab70c

Please sign in to comment.