{"record":{"id":"7ac9c12db2a4a361","repo":"tailscale/tailscale","slug":"create-match-subnet-route-mark-rule-w","errorCode":null,"errorMessage":"create match subnet route mark rule: %w","messagePattern":"create match subnet route mark rule: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/linuxfw/nftables_runner.go","lineNumber":1866,"sourceCode":"\t\t},\n\t\t&expr.Counter{},\n\t\tendAction,\n\t}\n\n\trule := &nftables.Rule{\n\t\tTable: table,\n\t\tChain: chain,\n\t\tExprs: exprs,\n\t}\n\treturn rule, nil\n}\n\n// addMatchSubnetRouteMarkRule adds a rule that matches packets with\n// the subnet route mark and takes the specified action.\nfunc addMatchSubnetRouteMarkRule(conn *nftables.Conn, table *nftables.Table, chain *nftables.Chain, action MatchDecision) error {\n\trule, err := createMatchSubnetRouteMarkRule(table, chain, action)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"create match subnet route mark rule: %w\", err)\n\t}\n\t_ = conn.AddRule(rule)\n\n\tif err := conn.Flush(); err != nil {\n\t\treturn fmt.Errorf(\"flush add rule: %w\", err)\n\t}\n\n\treturn nil\n}\n\n// AddSNATRule adds a netfilter rule to SNAT traffic destined for\n// local subnets.\nfunc (n *nftablesRunner) AddSNATRule() error {\n\tconn := n.conn\n\n\tfor _, table := range n.getTables() {\n\t\tchain, err := getChainFromTable(conn, table.Nat, chainNamePostrouting)\n\t\tif err != nil {","sourceCodeStart":1848,"sourceCodeEnd":1884,"githubUrl":"https://github.com/tailscale/tailscale/blob/6e0912f97994f927632b34ae9e63b53d6516a6ac/util/linuxfw/nftables_runner.go#L1848-L1884","documentation":"addMatchSubnetRouteMarkRule failed to construct the mark-matching rule via createMatchSubnetRouteMarkRule — an internal expression-building failure (e.g. unsupported family or immediate/payload expression error), not a kernel operation failure.","triggerScenarios":"Thrown at util/linuxfw/nftables_runner.go:1866 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for which expression failed to build.","Verify the table family is supported by the rule builder.","Retry after fixing the family/chain parameters."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6e0912f97994f927632b34ae9e63b53d6516a6ac","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}