Commit eca1738
committed
fix(network): prevent mDNS from overwriting valid peer addresses (TM-B1)
After network partition recovery, mDNS rediscovery was overwriting
complete peer addresses (e.g., /ip4/x.x.x.x/tcp/10000) with incomplete
ones (e.g., /ip4/x.x.x.x without port), causing "Multiaddr is not
supported" errors during reconnection attempts.
Changes:
- Add `Ignored` variant to AlysNetworkBehaviourEvent for unhandled events
- Filter mDNS addresses to only include dialable ones with transport protocol
- Validate addresses in update_peer_address() before overwriting complete
addresses with incomplete ones (defense-in-depth)
- Handle Ignored events in network_actor event loop1 parent 4655ef0 commit eca1738
File tree
3 files changed
+67
-34
lines changed- app/src/actors_v2/network
- managers
3 files changed
+67
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 204 | + | |
208 | 205 | | |
209 | 206 | | |
210 | 207 | | |
| |||
222 | 219 | | |
223 | 220 | | |
224 | 221 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 222 | + | |
230 | 223 | | |
231 | 224 | | |
232 | 225 | | |
| |||
236 | 229 | | |
237 | 230 | | |
238 | 231 | | |
239 | | - | |
240 | 232 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
244 | 257 | | |
245 | 258 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 259 | + | |
251 | 260 | | |
252 | 261 | | |
253 | 262 | | |
254 | | - | |
255 | 263 | | |
256 | 264 | | |
257 | 265 | | |
258 | 266 | | |
259 | 267 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 268 | + | |
265 | 269 | | |
266 | 270 | | |
267 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
257 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
258 | 267 | | |
259 | 268 | | |
260 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
261 | 288 | | |
262 | 289 | | |
263 | | - | |
264 | | - | |
265 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
266 | 293 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 294 | + | |
270 | 295 | | |
271 | 296 | | |
272 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2034 | 2034 | | |
2035 | 2035 | | |
2036 | 2036 | | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
2037 | 2041 | | |
2038 | 2042 | | |
2039 | 2043 | | |
| |||
0 commit comments