mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
direction was settable but not clearable: once a marker or project-level definition had direction=tx/rx, no update path could return it to "both directions", and the definition-sync fan-out silently kept stale values on every inherited copy. Introduce a _UNSET sentinel (link.py) distinct from None so updaters can tell "caller omitted direction" (preserve) from "caller passed None" (clear). Thread it through UDPLink.update_marker and Project.update_marker_definition; the two REST routes use Pydantic v2 model_fields_set to translate an explicit JSON null into the sentinel. MCP follows with a "both" token: link_marker / marker_definition handlers map direction="both" to a null in the REST body (tri-state: omit=preserve, tx/rx=set, both=clear), and the tool descriptions/docstrings document it. Backward compatible: omitting direction or passing tx/rx behaves exactly as before; only an explicit null / "both" clears.