Skip to content

Commit

Permalink
Rearranged code related to gh-1
Browse files Browse the repository at this point in the history
  • Loading branch information
PacketCrunch committed Jun 28, 2022
1 parent 8bd0974 commit 615b195
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ebpf/kernel/llb_kern_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,13 @@ dp_ctv4_in(void *ctx, struct xfi *F)
xi->nat_xip = F->l4m.nxip;
xi->nat_xport = F->l4m.nxport;

if (xi->nat_xip == 0 &&
!(F->pm.nf & (LLB_NAT_HDST|LLB_NAT_HSRC))) {
if (F->pm.nf == LLB_NAT_DST) {
xi->nat_flags = LLB_NAT_HDST;
} else if (F->pm.nf == LLB_NAT_SRC){
xi->nat_flags = LLB_NAT_HSRC;
if (F->pm.nf & (LLB_NAT_DST|LLB_NAT_SRC)) {
if (xi->nat_xip == 0) {
if (F->pm.nf == LLB_NAT_DST) {
xi->nat_flags = LLB_NAT_HDST;
} else if (F->pm.nf == LLB_NAT_SRC){
xi->nat_flags = LLB_NAT_HSRC;
}
}
}

Expand Down

0 comments on commit 615b195

Please sign in to comment.