Page MenuHomeFreeBSD

netinet6: simplify selectroute()
ClosedPublic

Authored by melifaro on Jul 4 2022, 6:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 12:57 PM
Unknown Object (File)
Tue, Oct 22, 11:25 AM
Unknown Object (File)
Mon, Oct 21, 2:42 PM
Unknown Object (File)
Oct 3 2024, 9:29 PM
Unknown Object (File)
Oct 3 2024, 1:56 AM
Unknown Object (File)
Oct 1 2024, 10:01 AM
Unknown Object (File)
Sep 27 2024, 7:39 PM
Unknown Object (File)
Sep 26 2024, 11:05 PM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46256
Build 43145: arc lint + arc unit