Page MenuHomeFreeBSD

netinet6: simplify selectroute()
ClosedPublic

Authored by melifaro on Jul 4 2022, 6:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 7:14 PM
Unknown Object (File)
Nov 22 2024, 4:51 AM
Unknown Object (File)
Nov 19 2024, 12:03 PM
Unknown Object (File)
Nov 19 2024, 12:02 PM
Unknown Object (File)
Nov 13 2024, 6:30 PM
Unknown Object (File)
Nov 11 2024, 9:14 PM
Unknown Object (File)
Oct 22 2024, 12:57 PM
Unknown Object (File)
Oct 22 2024, 11: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