From ac849ba3fec590c3d04d6979b5e6016030bc3c5d Mon Sep 17 00:00:00 2001 From: malmert Date: Sat, 7 Mar 2026 16:45:32 +0100 Subject: [PATCH] tc test 4 --- backend/src/utilities/ebpf_bridge_events.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/utilities/ebpf_bridge_events.py b/backend/src/utilities/ebpf_bridge_events.py index cd76ab5..938ee56 100644 --- a/backend/src/utilities/ebpf_bridge_events.py +++ b/backend/src/utilities/ebpf_bridge_events.py @@ -564,6 +564,12 @@ def _sigterm(_signum: int, _frame: object) -> None: raise KeyboardInterrupt +def _json_safe(value: object) -> object: + if isinstance(value, bytes): + return value.decode("utf-8", "replace") + return value + + def _ensure_clean_clsact(iface: str) -> None: subprocess.run(["tc", "qdisc", "del", "dev", iface, "clsact"], check=False, capture_output=True, text=True) _run_checked(["tc", "qdisc", "add", "dev", iface, "clsact"]) @@ -672,8 +678,8 @@ def main() -> int: { "status": "collector_started", "ifaces": sorted(TARGET_INTERFACES), - "ingress_program": ingress_prog_name, - "egress_program": egress_prog_name, + "ingress_program": _json_safe(ingress_prog_name), + "egress_program": _json_safe(egress_prog_name), "build_dir": str(args.build_dir), }, separators=(",", ":"),