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
Unknown Object (File)
Oct 20 2024, 8:48 AM
Unknown Object (File)
Oct 8 2024, 4:49 AM
Unknown Object (File)
Oct 1 2024, 7:55 AM
Unknown Object (File)
Sep 26 2024, 10:02 AM
Unknown Object (File)
Sep 24 2024, 4:54 PM
Unknown Object (File)
Sep 19 2024, 9:06 PM
Unknown Object (File)
Sep 17 2024, 9:52 PM
Unknown Object (File)
Sep 17 2024, 9:27 PM
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.