Unit data to an individual ID (>= 1000000) is copied to every OpenBridge
(VER > 1) even when the destination was just heard on a local system and the
SUB_MAP lookup below already delivers it here.
Seen in the field with a D-APRS gateway and a local MOTOTRBO behind a hotspot:
every ARS/LRRP answer of the gateway (one per minute per radio) went out on all
6 bridges of the master (478 copies in 5 minutes for a single radio), and remote
masters that mis-classify those frames ended up creating a dynamic talkgroup
named after the radio id.
Skip the OBP fan-out when the SUB_MAP entry for the destination is on a
non-OPENBRIDGE system and younger than UNIT_DATA_LOCAL_SUB_MAX_AGE (900 s).
Subscribers learned via an OpenBridge, or stale entries, keep the current
behaviour, so a radio that moved to another master is still reachable.
Tests: fresh local sub -> no OBP copy (fails without the fix); stale local sub
and sub learned via OBP -> still fanned out. Full suite: 753 passed (the only
failure, test_udp_rcvbuf, is environment-specific and fails on master too).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jumj5dWY3YwV9yP6YdFE6n