Skip to content

Commit

Permalink
loxilb-io/loxilb#864 Updated mark values fro src-ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Nov 20, 2024
1 parent 4bf6e3e commit a3edc2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/llb_kern_natlbfwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ dp_do_nat(void *ctx, struct xfi *xf)
memset(&key, 0, sizeof(key));
key.mark = xf->pm.dp_mark;

if (!(key.mark & 0xc0000000)) {
if (!(key.mark & 0x80000000)) {
DP_XADDR_CP(key.daddr, xf->l34m.daddr);
if (xf->l34m.nw_proto != IPPROTO_ICMP) {
key.dport = xf->l34m.dest;
Expand All @@ -150,6 +150,10 @@ dp_do_nat(void *ctx, struct xfi *xf)
if (xf->l2m.dl_type == bpf_ntohs(ETH_P_IPV6)) {
key.v6 = 1;
}

if (key.mark & 0x40000000) {
key.mark = 0;
}
}

LL_DBG_PRINTK("[NAT] Lookup");
Expand Down

0 comments on commit a3edc2f

Please sign in to comment.