Page MenuHomeFreeBSD

netinet6: simplify selectroute()
ClosedPublic

Authored by melifaro on Jul 4 2022, 6:10 PM.
Tags
None
Referenced Files
F109209900: D35711.diff
Sun, Feb 2, 2:33 AM
F109169495: D35711.diff
Sat, Feb 1, 4:58 PM
Unknown Object (File)
Sat, Jan 25, 8:37 PM
Unknown Object (File)
Sat, Jan 25, 1:22 PM
Unknown Object (File)
Thu, Jan 23, 1:45 AM
Unknown Object (File)
Tue, Jan 14, 11:02 AM
Unknown Object (File)
Fri, Jan 10, 7:02 PM
Unknown Object (File)
Fri, Jan 10, 6:16 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable