Bug 255264 - Unable to add default route for fib
Summary: Unable to add default route for fib
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-20 14:24 UTC by Neal Nelson
Modified: 2021-04-22 07:28 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (ports)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neal Nelson 2021-04-20 14:24:44 UTC
Before upgrading to 13.0 I used to create a default route in fib 1 so that openvpn could use it to set up a vpn for a jail to use.

This is the setup in rc.conf that worked:

static_routes="vpn"
route_vpn="default 10.0.0.1 -fib 1"

After upgrading to 13.0 I get the message "Network is unreachable" and fib 1 contains no default route.
Comment 1 Marek Zarychta 2021-04-20 15:09:55 UTC
The default behaviour has changed. Now in dmesg we get: 
"WARNING: Adding ifaddrs to all fibs has been turned off by default. Consider tuning net.add_addr_allfibs if needed"

Please add globally the sysctl net.add_addr_allfibs=1 to revert to the old behaviour. You can also solve this by assigning fib 1 to the interface which is supposed to carry this route or by installing the network route for this interface in fib 1.
Comment 2 Neal Nelson 2021-04-20 15:42:51 UTC
Thanks for the information. I saw the message upon boot, but it looks to be a large sweeping setting which made me nervous. Also I wasn't sure if it referred to this situation precisely as frankly I don't really understand what it's saying.

After setting this sysctl, all seems to be working as it was before.

Thanks for the very rapid response (unlike on the forum).
Comment 3 Alexander V. Chernikov freebsd_committer 2021-04-20 20:28:04 UTC
(In reply to Neal Nelson from comment #2)
Hi Neal, you mentioned that the message wasn't helpful.

Do you by any chance have any suggestions/comments on how can the message be improved to provide more context?

Thank you!
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-04-21 03:57:58 UTC
^Triage: Re-open pending potential messaging improvement, request feedback from reporter
Comment 5 Neal Nelson 2021-04-22 07:28:01 UTC
The entry in /usr/src/UPDATING that has been pointed out to me explains the situation a little better than the current message. I'm sure the current message makes sense to those that know the ins and outs, but not those of us not quite so well versed in the intricacies of network routing:

Default value of net.add_addr_allfibs has been changed to 0.
If you have multi-fib configuration and rely on existence of all
interface routes in every fib, you need to set the above sysctl to 1.

It's a bit wordy, but more helpful. If it's too wordy, a reference to the entry in UPDATING could be made.

As a further suggestion; it might also be useful to add the entries from UPDATING to the release notes. I found the entry there stating the change, but it was of no use to me whatsoever as it didn't state the consequences of the change. I realise that the release notes are rather long already, but I'm sure that some method could be devised to auto include UPDATING entries.