Page MenuHomeFreeBSD

netinet6: simplify selectroute()
ClosedPublic

Authored by melifaro on Jul 4 2022, 6:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 7:59 PM
Unknown Object (File)
Mon, Apr 1, 1:07 AM
Unknown Object (File)
Feb 23 2024, 10:06 AM
Unknown Object (File)
Feb 11 2024, 9:26 PM
Unknown Object (File)
Jan 31 2024, 9:06 AM
Unknown Object (File)
Jan 31 2024, 9:06 AM
Unknown Object (File)
Jan 31 2024, 9:06 AM
Unknown Object (File)
Jan 30 2024, 1:25 AM
Subscribers

Details

Summary

Effectively selectroute() addresses two different cases:
providing interface info for multicast destinations and providing
nexthop data for unicast ones. Handling of both is intertwined,
especially in the error handling part.
Factor out all route lookup logic in a separate function,
lookup_route().
Ensure consistent KPI: no error means *retifp is set and otherwise.

Test Plan

17:54 [0] m@devel2 s kyua test -k /usr/tests/sys/netinet6/Kyuafile test_ip6_output.py
test_ip6_output.py:TestIP6Output::test_output6_base -> passed [0.413s]
test_ip6_output.py:TestIP6Output::test_output6_nhop -> passed [0.393s]
test_ip6_output.py:TestIP6Output::test_output6_pktinfo[empty] -> passed [0.393s]
test_ip6_output.py:TestIP6Output::test_output6_pktinfo[ifsame] -> passed [0.404s]
test_ip6_output.py:TestIP6Output::test_output6_pktinfo[ipandif] -> passed [0.419s]
test_ip6_output.py:TestIP6Output::test_output6_pktinfo[iponly1] -> passed [0.411s]
test_ip6_output.py:TestIP6Output::test_output6_pktinfo[nolocalip] -> passed [0.419s]
test_ip6_output.py:TestIP6OutputLL::test_output6_linklocal -> passed [0.412s]
test_ip6_output.py:TestIP6OutputMulticast::test_output6_multicast[ff02] -> passed [0.399s]
test_ip6_output.py:TestIP6OutputMulticast::test_output6_multicast[ff05] -> passed [0.408s]
test_ip6_output.py:TestIP6OutputMulticast::test_output6_multicast[ff08] -> passed [0.392s]
test_ip6_output.py:TestIP6OutputMulticast::test_output6_multicast[ff0e] -> passed [0.401s]
test_ip6_output.py:TestIP6OutputNhopLL::test_output6_nhop_linklocal -> passed [0.445s]

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable