Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtsold: run script if MANAGED bit set #4476

Merged
merged 1 commit into from Oct 8, 2020

Conversation

emes
Copy link
Contributor

@emes emes commented Oct 7, 2020

In FreeBSD 12.2-STABLE rtsold was changed to allow for a script to run when the router advertisement has the MANAGED flag set.

From rfc4861:

M              1-bit "Managed address configuration" flag.  When
                      set, it indicates that addresses are available via
                      Dynamic Host Configuration Protocol [DHCPv6].
 
                      If the M flag is set, the O flag is redundant and
                      can be ignored because DHCPv6 will return all
                      available configuration information.

If the managed bit is set then the script specified with the -O option is not executed. The -M option is (currently) processed before the -O option. The {$g['varetc_path']}/rtsold_{$wanif}_script.sh never runs and therefore no DHCPv6 client is started.

I probably could have just changed the O option to M, but seemed safer and possibly more resistant to future rtsold changes to include both since only one will execute.

rtsold.c changes:

freebsd/freebsd-src@8ffcd47

https://reviews.freebsd.org/D26099

I also noticed that the {$g['varetc_path']}/rtsold_{$wanif}_script.sh is using $2 when the input to the script is only the name of the interface, but did not address that.

@jim-p jim-p requested a review from rbgarga October 7, 2020 20:12
@netgate-git-updates netgate-git-updates merged commit 94d0e37 into pfsense:master Oct 8, 2020
@emes emes deleted the rtsold-managed-flag branch October 8, 2020 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants