From 24625f8556e4ebdd14498b551c8310687117b383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Thu, 29 Oct 2026 22:18:00 +0100 Subject: [PATCH 1/2] yangerd: classify FRR local routes as kernel, not direct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FRR keeps a host route for each of an interface's own addresses as protocol "local". The legacy yanger collector had no mapping for it, so it fell through to infix-routing:kernel; operational data checks skip kernel routes. yangerd mapped local to direct, which surfaced those host routes as stray connected routes. Match the old behaviour. Signed-off-by: Mattias Walström --- src/yangerd/internal/zapiwatcher/zapiwatcher.go | 2 +- src/yangerd/internal/zapiwatcher/zapiwatcher_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yangerd/internal/zapiwatcher/zapiwatcher.go b/src/yangerd/internal/zapiwatcher/zapiwatcher.go index 171b87976c..1edd6919ad 100644 --- a/src/yangerd/internal/zapiwatcher/zapiwatcher.go +++ b/src/yangerd/internal/zapiwatcher/zapiwatcher.go @@ -321,7 +321,7 @@ func (w *ZAPIWatcher) collectRoutes(ctx context.Context, family string) ([]json. var protocolMap = map[string]string{ "kernel": "infix-routing:kernel", "connected": "ietf-routing:direct", - "local": "ietf-routing:direct", + "local": "infix-routing:kernel", "static": "ietf-routing:static", "ospf": "ietf-ospf:ospfv2", "ospf6": "ietf-ospf:ospfv3", diff --git a/src/yangerd/internal/zapiwatcher/zapiwatcher_test.go b/src/yangerd/internal/zapiwatcher/zapiwatcher_test.go index 35cc1defc2..87e83eefe7 100644 --- a/src/yangerd/internal/zapiwatcher/zapiwatcher_test.go +++ b/src/yangerd/internal/zapiwatcher/zapiwatcher_test.go @@ -66,7 +66,7 @@ func TestProtocolName(t *testing.T) { cases := map[string]string{ "kernel": "infix-routing:kernel", "connected": "ietf-routing:direct", - "local": "ietf-routing:direct", + "local": "infix-routing:kernel", // host route for own addr -> kernel "static": "ietf-routing:static", "ospf": "ietf-ospf:ospfv2", "rip": "ietf-rip:rip", From 219b589dd4d1008f0c73ee8a6f85dde975b988d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Thu, 29 Oct 2026 22:23:00 +0100 Subject: [PATCH 2/2] infix-dev: load the skill for commit and push too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Committing and pushing are governed by the same reviewer rules (commit format, sign-off, no Claude trailer, consolidation) as the code changes, so the trigger must cover them, not just build/test/change. Signed-off-by: Mattias Walström --- .claude/skills/infix-dev/SKILL.md | 3 ++- AGENTS.md | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.claude/skills/infix-dev/SKILL.md b/.claude/skills/infix-dev/SKILL.md index 1e22188e62..12b576382a 100644 --- a/.claude/skills/infix-dev/SKILL.md +++ b/.claude/skills/infix-dev/SKILL.md @@ -10,7 +10,8 @@ when_to_use: >- Building or flashing an Infix image; running `make test` / writing a test case; editing src/confd/yang or wiring a YANG model into a daemon; changing confd, netd, statd or yangerd; changing src/webui pages, handlers or templates; debugging the - QEMU dev build; writing a commit, doc page or ChangeLog entry. + QEMU dev build; writing a commit, doc page or ChangeLog entry; committing or + pushing changes. allowed-tools: Read, Grep, Glob, Bash(make *), Bash(go *), Bash(git submodule *), Bash(git status), Bash(git log:*), Bash(ls *) --- diff --git a/AGENTS.md b/AGENTS.md index 6e385e9caa..ea8828a5ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,7 +5,7 @@ over NETCONF, RESTCONF and a CLI from YANG models. The developer documentation is in `doc/`, starting with `doc/developers-guide.md`, and contribution rules are in `.github/CONTRIBUTING.md`. -Before building, testing or changing anything in this tree, invoke the -`infix-dev` skill in `.claude/skills/infix-dev/`. It names the document -to read for the task at hand and lists the rules reviewers enforce. -When the skill and the docs disagree, the docs win. +Before building, testing, changing, committing or pushing anything in +this tree, invoke the `infix-dev` skill in `.claude/skills/infix-dev/`. +It names the document to read for the task at hand and lists the rules +reviewers enforce. When the skill and the docs disagree, the docs win.