Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit b74917e

Browse files
committed
fix a typo in masq agent is daddr instead of saddr
1 parent f56c64b commit b74917e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

pkg/masq/masq.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func (ma *IPMasqAgent) SyncRules(ctx context.Context) error {
278278
Table: table,
279279
Chain: chain,
280280
Exprs: []expr.Any{
281-
&expr.Fib{Register: 0x1, FlagSADDR: true, ResultADDRTYPE: true},
281+
&expr.Fib{Register: 0x1, FlagDADDR: true, ResultADDRTYPE: true},
282282
&expr.Cmp{Op: expr.CmpOpEq, Register: 0x1, Data: network.EncodeWithAlignment(byte(unix.RTN_LOCAL))},
283283
&expr.Verdict{Kind: expr.VerdictAccept},
284284
},

pkg/masq/masq_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ table inet kindnet-ipmasq {
5252
chain postrouting {
5353
type nat hook postrouting priority srcnat - 10; policy accept;
5454
ct state established,related accept
55-
fib saddr type local accept
55+
fib daddr type local accept
5656
ip daddr @noMasqV4 accept
5757
ip6 daddr @noMasqV6 accept
5858
masquerade counter packets 0 bytes 0
@@ -86,7 +86,7 @@ table inet kindnet-ipmasq {
8686
chain postrouting {
8787
type nat hook postrouting priority srcnat - 10; policy accept;
8888
ct state established,related accept
89-
fib saddr type local accept
89+
fib daddr type local accept
9090
ip daddr @noMasqV4 accept
9191
ip6 daddr @noMasqV6 accept
9292
masquerade counter packets 0 bytes 0
@@ -121,7 +121,7 @@ table inet kindnet-ipmasq {
121121
chain postrouting {
122122
type nat hook postrouting priority srcnat - 10; policy accept;
123123
ct state established,related accept
124-
fib saddr type local accept
124+
fib daddr type local accept
125125
ip daddr @noMasqV4 accept
126126
ip6 daddr @noMasqV6 accept
127127
masquerade counter packets 0 bytes 0
@@ -156,7 +156,7 @@ table inet kindnet-ipmasq {
156156
chain postrouting {
157157
type nat hook postrouting priority srcnat - 10; policy accept;
158158
ct state established,related accept
159-
fib saddr type local accept
159+
fib daddr type local accept
160160
ip daddr @noMasqV4 accept
161161
ip6 daddr @noMasqV6 accept
162162
masquerade counter packets 0 bytes 0
@@ -195,7 +195,7 @@ table inet kindnet-ipmasq {
195195
chain postrouting {
196196
type nat hook postrouting priority srcnat - 10; policy accept;
197197
ct state established,related accept
198-
fib saddr type local accept
198+
fib daddr type local accept
199199
ip daddr @noMasqV4 accept
200200
ip6 daddr @noMasqV6 accept
201201
masquerade counter packets 0 bytes 0

0 commit comments

Comments
 (0)