Page MenuHomeFreeBSD

Further refactor IPv4 interface route creation.
ClosedPublic

Authored by melifaro on Jan 19 2021, 11:51 PM.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

donner added inline comments.
sys/netinet/in.c
764

The comment is misleading. This function checks, if the IP address on the interface is singular enough to add an additional loopback route for the local host in the attached network,

Of course, all excluded cases do need a loopback route, too. But not an extra one,

sys/netinet/in.c
764

Indeed, there is a clash for the "loopback" term. We will always install some loopback route, the question is whether we install it via ifa_maintain_loopback_route() or not.
In the end, we should unify both "loopback" and "prefix" route handling, but it's too late to untangle in 13.

Anyway, I've updated the description, hope it looks more clear now.

Remove in_addprefix() now-unused flags argument.

This revision is now accepted and ready to land.Jan 21 2021, 7:01 AM

this diff fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252883 thanks can you mention the PR when this patch gets merged? thanks!