Commit 314c764
committed
fix: IPv6 TCP connection support
Three bugs prevented native IPv6 TCP connections from working:
1. TcpListenerConnection::serve_listener() assigned the remote peer
address as the connection's local address (tcp_listener.rs). For
IPv4-mapped addresses this was harmless, but for native IPv6 it
produced an invalid local address. Fixed by capturing the listener's
actual local address before the accept loop.
2. build_via_received() serialized IPv6 addresses without brackets in
the Via received= parameter (connection.rs), producing
received=2001:db8::1 instead of received=[2001:db8::1]. When rsip
re-parsed this, it misinterpreted colons as port separators.
3. serve_connection() silently discarded the Result from serve_loop()
(transport_layer.rs), making transport errors invisible. The error
is now logged at warn level.
Tested with production Ribbon SBC traffic over TCP/IPv6. All three
fixes are required for native IPv6 TCP to work end-to-end.
Relates to #94 (similar parser failures in on_received_message).1 parent 0f40684 commit 314c764
3 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | | - | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
437 | 440 | | |
438 | 441 | | |
439 | 442 | | |
| |||
0 commit comments