Page MenuHomeFreeBSD

rtsol: introduce an 'always' script
ClosedPublic

Authored by kp on May 2 2023, 9:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 29, 1:36 PM
Unknown Object (File)
Oct 13 2024, 11:26 PM
Unknown Object (File)
Oct 7 2024, 10:46 AM
Unknown Object (File)
Oct 7 2024, 10:46 AM
Unknown Object (File)
Oct 7 2024, 10:45 AM
Unknown Object (File)
Oct 7 2024, 10:45 AM
Unknown Object (File)
Oct 7 2024, 10:24 AM
Unknown Object (File)
Sep 30 2024, 4:58 PM
Subscribers

Details

Summary

In addition to the 'M' and 'O' scripts (for when 'Managed' and 'Other'
flags are set) also introduce an 'always' script that is called for any
router advertisement (so even if M and O are not set).

This is primarly useful for systems like pfSense that wish to be
informed of routers for further system configuration.

See also https://redmine.pfsense.org/issues/14072

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 51309
Build 48200: arc lint + arc unit

Event Timeline

kp requested review of this revision.May 2 2023, 9:18 AM

First of all, it's a nice feature to have. I'm a bit unsure about the feature naming, though. The man page states that the new script will be called on _first_ router advertisement, which doesn't exactly match "always" assumption. Maybe it's worth naming it differently, like "first" or something similar?

usr.sbin/rtsold/rtsold.h
78

Nit: I'd either document it or rename a variable to be more self-documented.

Remove 'first' from the man page.

That's not quite accurate. rtsold will call the script every time it decides to
probe again. That's usually after the link comes back up, or the probe interval
expires.

The man page description was more misleading than enlightening. I've removed 'first' to reduce the deception.

rtsol will call the script for after every link state change, or when the probe interval expires (which only applies if it can't read the interface status.

Thank you for the clarification! LGTM (though, I'd still update the description on the alwaysconfig field).

This revision is now accepted and ready to land.May 2 2023, 3:56 PM
This revision was automatically updated to reflect the committed changes.