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

fix bug only NAT for internet SMB traffic

parent 58955c32
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 && (ip->daddr & SUBNET_MASK) == SUBNET_BASE)
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