Page MenuHomeFreeBSD

routing: do not allow PINNED routes to be overridden
ClosedPublic

Authored by ae on Jan 24 2025, 9:01 AM.
Tags
None
Referenced Files
F112553102: D48650.diff
Wed, Mar 19, 6:33 PM
F112516618: D48650.id149865.diff
Wed, Mar 19, 5:01 AM
Unknown Object (File)
Sun, Mar 2, 10:57 AM
Unknown Object (File)
Tue, Feb 25, 1:03 PM
Unknown Object (File)
Feb 14 2025, 1:04 PM
Unknown Object (File)
Feb 13 2025, 12:11 AM
Unknown Object (File)
Feb 9 2025, 12:46 AM
Unknown Object (File)
Feb 4 2025, 6:40 AM

Details

Summary

First configured PINNED routes should have higher priority.
This also should fix test_routing_l3 that is broken after D47534.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 61973
Build 58857: arc lint + arc unit

Event Timeline

ae held this revision as a draft.
ae published this revision for review.Jan 24 2025, 9:08 AM
ae added reviewers: glebius, network.

Thank you for taking a look at this!
Not only it fixes D47534, it also does not break D47585 (introduce a regression).

This change addresses the failing test, but there's a new failure in sys/netinet/fibs_test:same_ip_multiple_ifaces_fib0. The test creates two interfaces, then assigns the same IP address to each, with different masks. With this change, the second address assignment fails with EEXIST.

I'm not sure if that's actually a valid thing to do in practice; see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189089 . Maybe @asomers remembers?

This change addresses the failing test, but there's a new failure in sys/netinet/fibs_test:same_ip_multiple_ifaces_fib0. The test creates two interfaces, then assigns the same IP address to each, with different masks. With this change, the second address assignment fails with EEXIST.

I'm not sure if that's actually a valid thing to do in practice; see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189089 . Maybe @asomers remembers?

At the time I wrote that test, I was doing a bunch of changes to make multiple fibs work better. Not just for firewalls, but for applications. I'm sure that my then-employer didn't have a use case for assigning the same IP address to multiple interfaces on the same fib at the same time. I probably found the crash bug just through exploratory testing. And I think that the purpose of the test was just to ensure that the system didn't panic.

This revision was not accepted when it landed; it landed in state Needs Review.Sun, Mar 2, 10:57 AM
This revision was automatically updated to reflect the committed changes.