util/linuxfw: insert rather than append nftables DNAT rule (#11303)

Ensure that the latest DNATNonTailscaleTraffic rule
gets inserted on top of any pre-existing rules.

Updates tailscale/tailscale#11281

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
pull/11312/head
Irbe Krumina 3 months ago committed by GitHub
parent e324a5660f
commit 097c5ed927
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -173,7 +173,7 @@ func (n *nftablesRunner) DNATNonTailscaleTraffic(tunname string, dst netip.Addr)
},
},
}
n.conn.AddRule(dnatRule)
n.conn.InsertRule(dnatRule)
return n.conn.Flush()
}

Loading…
Cancel
Save