mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-05 08:02:20 -08:00
In nftables, when a chain was not found, Tailscale would report: chain mangle not found in table OUTPUT for the OUTPUT chain in the mangle table. This patch strikes that and reverses it. It also adds types/structs.RequireKeyedLiterals to prevent this from happening again to this struct. Fixes #22877 Change-Id: I930b1c2d66dc658e0486400fd7dc2c93591c3984 Signed-off-by: Simon Law <[email protected]>
20 lines
863 B
Go
20 lines
863 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Package structs contains types used to define structs with special behaviors.
|
|
package structs
|
|
|
|
// Incomparable is a zero-width incomparable type. If added as the
|
|
// first field in a struct, it marks that struct as not comparable
|
|
// (can't do == or be a map key) and usually doesn't add any width to
|
|
// the struct (unless the struct has only small fields).
|
|
//
|
|
// Be making a struct incomparable, you can prevent misuse (prevent
|
|
// people from using ==), but also you can shrink generated binaries,
|
|
// as the compiler can omit equality funcs from the binary.
|
|
type Incomparable [0]func()
|
|
|
|
// RequireKeyedLiterals is a zero-width type. As the first field in a struct,
|
|
// it forces its literals to specify the named key for each field value.
|
|
type RequireKeyedLiterals struct{}
|