From bc5bde3a387dd28785a2ad007b6d7f526871655b Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Wed, 10 Jul 2024 15:33:16 +0900 Subject: [PATCH] gh-48 fullproxy regression fix after masquerading changes --- pkg/loxinet/rules.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/loxinet/rules.go b/pkg/loxinet/rules.go index d1a3e1fe2..1776cef2a 100644 --- a/pkg/loxinet/rules.go +++ b/pkg/loxinet/rules.go @@ -1563,7 +1563,9 @@ func (R *RuleH) AddNatLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, r.tuples = rt r.zone = R.zone r.name = serv.Name - if serv.Mode == cmn.LBModeFullNAT || serv.Mode == cmn.LBModeOneArm || serv.Mode == cmn.LBModeHostOneArm { + if serv.Snat { + r.act.actType = RtActSnat + } else if serv.Mode == cmn.LBModeFullNAT || serv.Mode == cmn.LBModeOneArm || serv.Mode == cmn.LBModeHostOneArm { r.act.actType = RtActFullNat } else if serv.Mode == cmn.LBModeFullProxy { r.act.actType = RtActFullProxy @@ -1583,11 +1585,7 @@ func (R *RuleH) AddNatLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, r.hChk.prbRetries = serv.ProbeRetries r.hChk.prbTimeo = serv.ProbeTimeout r.hChk.actChk = serv.Monitor - if serv.Snat { - r.act.actType = RtActSnat - } else { - r.act.actType = RtActDnat - } + r.act.action = &natActs r.ruleNum, err = R.tables[RtLB].Mark.GetCounter() if err != nil {