From cecaf298bba02e085cffeb1ba996a0bd0ed24961 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Wed, 30 Sep 2026 10:00:38 +0800 Subject: [PATCH] feat(controller): expose kernel_datapath on the link payload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Runtime fact recomputed from the NIO wiring on every load (not persisted). Without it clients cannot tell a relay link from a kernel link whose compute lacks a filter capability — both show up as kernel-only types missing from available_filters. --- gns3server/controller/link.py | 5 +++++ tests/controller/test_link.py | 1 + 2 files changed, 6 insertions(+) diff --git a/gns3server/controller/link.py b/gns3server/controller/link.py index 4a324bb65..337df9e29 100644 --- a/gns3server/controller/link.py +++ b/gns3server/controller/link.py @@ -847,6 +847,11 @@ class Link: "capture_file_path": self.capture_file_path, "capture_compute_id": self.capture_compute_id, "link_type": self._link_type, + # runtime fact, not persisted: recomputed from the NIO wiring on + # every load (tells clients which datapath impairs this link — + # kernel-only filter types absent from available_filters are + # then distinguishable from capability gaps) + "kernel_datapath": self.kernel_datapath, "filters": self._filters, "markers": self._markers, "suspend": self._suspended, diff --git a/tests/controller/test_link.py b/tests/controller/test_link.py index 12436abb5..66a94e708 100644 --- a/tests/controller/test_link.py +++ b/tests/controller/test_link.py @@ -228,6 +228,7 @@ async def test_json(project, compute): "suspend": False, "wireshark": False, "link_type": "ethernet", + "kernel_datapath": False, "capturing": False, "capture_file_name": None, "capture_file_path": None,