]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Switch direct rt fields access in rtsock.c to newly-create field acessors.
authormelifaro <melifaro@FreeBSD.org>
Fri, 18 Dec 2020 22:00:57 +0000 (22:00 +0000)
committermelifaro <melifaro@FreeBSD.org>
Fri, 18 Dec 2020 22:00:57 +0000 (22:00 +0000)
commit86ac20efb93de706766ab72f549e703ac21e9054
treeaa1e580ee9b3db91a76fadd7a618fc0dadc6f286
parent9ed9a2424d0fee9e1333e881eecd92546f129688
Switch direct rt fields access in rtsock.c to newly-create field acessors.

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.

Differential Revision: https://reviews.freebsd.org/D27451
sys/net/rtsock.c