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>
This commit is contained in:
parent
d2fbdb005d
commit
0cdc8e20d6
|
@ -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…
Reference in New Issue