Page MenuHomeFreeBSD

Add per-FIB gateway support to rc.d/routing
ClosedPublic

Authored by andrew.fengler_scaleengine.com on Dec 6 2019, 5:36 PM.

Details

Summary

Make rc.d/routing to read defaultrouter_fibN and ipv6_defaultrouter_fibN, and
set it as the default gateway for FIB N, where N is from 1 to (net.fibs - 1)
This allows adding gateways for multiple FIBs in the same format as the main
gateway. (FIB 0)

Test Plan

The patch has been tested on several 12.0 machines, some with net.fibs == 1,
and some with net.fibs == 8 and a default gateway set for FIB 2.
Note that the _fibN gateways will only be read if you set net.fibs to a
number > 1 in /boot/loader.conf

To test:
Apply the patch for rc.d/routing
Add some extra per-fib defaultrouter variables, or not
Run rc.d/routing restart, or reboot the machine

Diff Detail

Repository
rG 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

This revision is now accepted and ready to land.Dec 7 2019, 6:26 AM

Thanks for this change. Is there a sentence stop missing in the man page change?

share/man/man5/rc.conf.5
2824

Is there is a sentence stop missing here?

This revision now requires review to proceed.Dec 9 2019, 3:23 PM

Thanks for fixing it. OK from manpages.
Can you commit it yourself or should I do that (giving proper credit, of course)?

This revision is now accepted and ready to land.Dec 9 2019, 3:41 PM
In D22706#497573, @bcr wrote:

Can you commit it yourself or should I do that (giving proper credit, of course)?

Please commit it, I don't think I can. Thanks.

share/man/man5/rc.conf.5
2824

Thanks, looks like I accidentally truncated the line at some point and didn't notice.

@allanjude Can you commit these changes? For the src part, I would require that bit, so I think it would be better if you did that.