Page MenuHomeFreeBSD

Switch direct rt fields access in rtsock.c to newly-create field acessors.
ClosedPublic

Authored by melifaro on Dec 2 2020, 10:48 PM.
Tags
None
Referenced Files
F105795391: D27451.diff
Fri, Dec 20, 7:38 PM
Unknown Object (File)
Sun, Dec 15, 12:28 PM
Unknown Object (File)
Wed, Dec 11, 10:37 PM
Unknown Object (File)
Thu, Dec 5, 4:17 AM
Unknown Object (File)
Mon, Dec 2, 9:10 AM
Unknown Object (File)
Mon, Dec 2, 9:09 AM
Unknown Object (File)
Mon, Dec 2, 9:09 AM
Unknown Object (File)
Mon, Dec 2, 8:47 AM
Subscribers

Details

Summary

rtsock code was build around the assumption that each rtentry record in the system radix tree is a ready-to-use sockaddr.
This assumptions turned out to be not quite true:

  • masks have their length tweaked, so we have rtsock_fix_netmask hack
  • IPv6 addresses have their scope embedded, so we have another explicit deembedding hack.

Change the code to decouple rtentry internals from rtsock code using newly-created rtentry accessors.
This will allow to eventually eliminate both of the hacks and change rtentry dst/mask format.

Test Plan
test_rtsock_l3:rtm_add_v4_gu_ifa_ordered_success  ->  passed  [0.145s]
test_rtsock_l3:rtm_add_v4_gw_direct_success  ->  passed  [0.013s]
test_rtsock_l3:rtm_add_v4_no_rtf_host_failure  ->  passed  [0.116s]
test_rtsock_l3:rtm_add_v4_temporal1_success  ->  passed  [0.189s]
test_rtsock_l3:rtm_add_v6_gu_gw_gu_direct_success  ->  passed  [0.119s]
test_rtsock_l3:rtm_add_v6_gu_ifa_hostroute_success  ->  passed  [0.120s]
test_rtsock_l3:rtm_add_v6_gu_ifa_ordered_success  ->  passed  [0.135s]
test_rtsock_l3:rtm_add_v6_gu_ifa_prefixroute_success  ->  passed  [0.116s]
test_rtsock_l3:rtm_add_v6_temporal1_success  ->  passed  [0.122s]
test_rtsock_l3:rtm_change_v4_flags_success  ->  passed  [0.117s]
test_rtsock_l3:rtm_change_v4_gw_success  ->  passed  [0.120s]
test_rtsock_l3:rtm_change_v4_mtu_success  ->  passed  [0.117s]
test_rtsock_l3:rtm_change_v6_flags_success  ->  passed  [0.117s]
test_rtsock_l3:rtm_change_v6_gw_success  ->  passed  [0.123s]
test_rtsock_l3:rtm_change_v6_mtu_success  ->  passed  [0.122s]
test_rtsock_l3:rtm_del_v4_gu_ifa_prefixroute_success  ->  passed  [0.120s]
test_rtsock_l3:rtm_del_v4_prefix_nogw_success  ->  passed  [0.117s]
test_rtsock_l3:rtm_del_v6_gu_ifa_hostroute_success  ->  passed  [0.121s]
test_rtsock_l3:rtm_del_v6_gu_ifa_prefixroute_success  ->  passed  [0.118s]
test_rtsock_l3:rtm_del_v6_gu_prefix_nogw_success  ->  passed  [0.117s]
test_rtsock_l3:rtm_get_v4_empty_dst_failure  ->  passed  [0.003s]
test_rtsock_l3:rtm_get_v4_exact_success  ->  passed  [0.149s]
test_rtsock_l3:rtm_get_v4_hostbits_failure  ->  passed  [0.117s]
test_rtsock_l3:rtm_get_v4_lpm_success  ->  passed  [0.118s]
test_rtsock_lladdr:rtm_add_v4_gu_lle_success  ->  passed  [0.117s]
test_rtsock_lladdr:rtm_add_v6_gu_lle_success  ->  passed  [0.115s]
test_rtsock_lladdr:rtm_add_v6_ll_lle_success  ->  passed  [0.114s]
test_rtsock_lladdr:rtm_del_v4_gu_lle_success  ->  passed  [0.117s]
test_rtsock_lladdr:rtm_del_v6_gu_lle_success  ->  passed  [0.114s]
test_rtsock_lladdr:rtm_del_v6_ll_lle_success  ->  passed  [0.115s]

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

melifaro edited the test plan for this revision. (Show Details)
melifaro added a reviewer: network.
This revision was not accepted when it landed; it landed in state Needs Review.Dec 18 2020, 10:01 PM
This revision was automatically updated to reflect the committed changes.