git: 5d1403a79a3e - main - [rtsock] Enforce netmask/RTF_HOST consistency.
Kristof Provost
kp at FreeBSD.org
Tue Apr 27 11:38:44 UTC 2021
On 25 Apr 2021, at 1:03, Alexander V. Chernikov wrote:
> The branch main has been updated by melifaro:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=5d1403a79a3e56403fb63c062252a23fce81e5f1
>
> commit 5d1403a79a3e56403fb63c062252a23fce81e5f1
> Author: Alexander V. Chernikov <melifaro at FreeBSD.org>
> AuthorDate: 2021-04-23 21:53:47 +0000
> Commit: Alexander V. Chernikov <melifaro at FreeBSD.org>
> CommitDate: 2021-04-24 22:41:27 +0000
>
> [rtsock] Enforce netmask/RTF_HOST consistency.
>
> 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.
>
> Differential Revision: https://reviews.freebsd.org/D29958
> MFC after: 2 days
I believe this commit triggers a number of regression test failures:
https://ci.freebsd.org/job/FreeBSD-main-amd64-test/18011/#showFailuresLink
The easiest way to reproduce the problem is to `kldload ipsec ; cd
/usr/tests/sys/netipsec ; kyua test`.
Reverting this patch allows the tests to pass again. (There are a few
others that also fail, but the ipsec tests appear to be the most
reliable way to demonstrate the problem.)
Best regards,
Kristof
More information about the dev-commits-src-all
mailing list