Page MenuHomeFreeBSD

[rtsock] Enforce netmask/RTF_HOST consistency
ClosedPublic

Authored by melifaro on Apr 23 2021, 9:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 10:06 PM
Unknown Object (File)
Dec 5 2024, 11:21 PM
Unknown Object (File)
Dec 5 2024, 8:01 AM
Unknown Object (File)
Nov 8 2024, 12:43 PM
Unknown Object (File)
Nov 8 2024, 11:32 AM
Unknown Object (File)
Nov 8 2024, 9:55 AM
Unknown Object (File)
Nov 2 2024, 5:35 AM
Unknown Object (File)
Oct 13 2024, 3:14 AM
Subscribers

Details

Summary

Traditionally we had 2 sources of information whether the added/delete route request targets network or a host route:
netmask (RTA_NETMASK) and RTF_HOST flag.

The former one is tricky: netmask can be empty or can explicitly specify the host netmask. Parsing netmask sockaddr requires per-family parsing and that's what rtsock code traditionally avoided. As a result, consistency was not enforced and it was possible to specify network with the RTF_HOST flag and vice versa.

Continue normalization efforts from D29826 and D29826 and ensure that RTF_HOST flag always reflects host/network data from netmask field.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38837
Build 35726: arc lint + arc unit