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, Apr 16, 5:42 PM
Unknown Object (File)
Mar 12 2024, 3:09 AM
Unknown Object (File)
Mar 8 2024, 10:11 AM
Unknown Object (File)
Mar 8 2024, 10:11 AM
Unknown Object (File)
Mar 8 2024, 10:10 AM
Unknown Object (File)
Mar 8 2024, 4:37 AM
Unknown Object (File)
Feb 18 2024, 10:38 PM
Unknown Object (File)
Feb 6 2024, 3:03 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 Not Applicable
Unit
Tests Not Applicable

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.