util/linuxfw: return created chain (#10563)

Ensure that if getOrCreateChain creates a new chain, it actually returns the created chain

Updates tailscale/tailscale#10399

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
pull/10566/head
Irbe Krumina 6 months ago committed by GitHub
parent d2fbdb005d
commit 0cdc8e20d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -429,7 +429,7 @@ func getOrCreateChain(c *nftables.Conn, cinfo chainInfo) (*nftables.Chain, error
return chain, nil
}
_ = c.AddChain(&nftables.Chain{
chain = c.AddChain(&nftables.Chain{
Name: cinfo.name,
Table: cinfo.table,
Type: cinfo.chainType,

Loading…
Cancel
Save