smoltcp-rs / smoltcp

a smol tcp/ip stack
BSD Zero Clause License
3.63k stars 402 forks source link

fix: don't panic if no suitable IPv6 src_addr is found #895

Closed thvdveld closed 5 months ago

thvdveld commented 5 months ago

Prevent panic when no suitable source address is found. If no suitable address is found, the loopback address is used instead. The function can still panic when the destination address is unspecified.

More tests are added:

This should fix #894 .

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d185a37) 79.82% compared to head (d26a313) 79.92%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #895 +/- ## ========================================== + Coverage 79.82% 79.92% +0.09% ========================================== Files 80 80 Lines 28053 28224 +171 ========================================== + Hits 22394 22557 +163 - Misses 5659 5667 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.