Commit e3acb6a
fix(multi_stream): join multicast group on EVERY local IPv4 interface
Replaces the single INADDR_ANY join in `_create_socket()` with an
explicit join on every UP IPv4 interface, via SIOCGIFADDR enumeration.
With INADDR_ANY the kernel selects one interface based on the routing
table (typically the default-route eth/ens0). That works for the
common case where radiod is remote and packets arrive over the
network — but on a co-located radiod (TTL=0) the packets emerge on
`lo` and never get delivered to a socket joined only on ens0. The
3.14.0 per-(client, radiod) multicast destinations exposed this
because the legacy "everyone shares one group" path happens to be
joined on multiple interfaces by other listeners on the same host.
Symptom that motivated this fix (B4-100, 2026-05-13):
* wspr-recorder, after upgrading to ka9q-python 3.14.0 and passing
client_id="wspr-recorder", saw zero RTP packets.
* `ip maddr show` showed the per-client group joined only on ens18.
* `tcpdump -i lo` confirmed radiod was sending the packets, but
they never reached the recorder.
* Joining on lo + ens18 (both interfaces) immediately restored
sample flow; all 13 WSPR bands resumed cleanly (1,440,000 samples
per cycle, 0 gaps).
The same pattern matters for multi-homed stations: a single
MultiStream consumer should receive radiod output regardless of
which interface the producer's packets arrive on. Joining on every
local IPv4 interface makes that transparent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent cc8c136 commit e3acb6a
1 file changed
Lines changed: 88 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
62 | 132 | | |
63 | 133 | | |
64 | 134 | | |
| |||
322 | 392 | | |
323 | 393 | | |
324 | 394 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
329 | 402 | | |
330 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
331 | 414 | | |
332 | 415 | | |
333 | 416 | | |
| |||
0 commit comments