Skip to content
Snippets Groups Projects
Commit 58955c32 authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

only NAT for internet traffic

parent f2aa8a9d
No related branches found
No related tags found
No related merge requests found
......@@ -280,7 +280,7 @@ int inter_op_ebpf(struct xdp_md *ctx)
ip->check = iph_csum(ip, data_end);
tcp->check = tcp_checksum(ip, tcp, data_end);
}
else if ((ip->saddr & SUBNET_MASK) == SUBNET_BASE && tcp->dest == DEST_PORT)
else if ((ip->saddr & SUBNET_MASK) == SUBNET_BASE && tcp->dest == DEST_PORT && (ip->daddr & SUBNET_MASK) == SUBNET_BASE)
{
__u32 alt_ip_index_key = 0;
__u32 *index_ptr = alt_ip_index.lookup(&alt_ip_index_key);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment