Bug 223407 - [patch] etc/network.subr invalidates -auto_linklocal ifconfig flag set via rc.conf
Summary: [patch] etc/network.subr invalidates -auto_linklocal ifconfig flag set via rc...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-net mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-11-03 19:44 UTC by Harald Schmalzbauer
Modified: 2019-01-28 08:06 UTC (History)
2 users (show)

See Also:


Attachments
Make rc(8) respect "-auto_linklocal" flag for INET6 ifconfig (423 bytes, patch)
2017-11-03 19:44 UTC, Harald Schmalzbauer
no flags Details | Diff
revised patch (725 bytes, patch)
2019-01-28 03:30 UTC, Eugene Grosbein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Schmalzbauer 2017-11-03 19:44:05 UTC
Created attachment 187704 [details]
Make rc(8) respect "-auto_linklocal" flag for INET6 ifconfig

ifconfig(8) can toggle automatic link-local address configuration per interface.
net.inet6.ip6.auto_linklocal predefines the default setting, which is to set AUTO_LINKLOCAL on all interfaces.

Users should be able to disable automatic link-local address configuration selectively, not only globally (by the mentioned sysctl).

Basically, adding "-auto_linklocal" as rc.conf(5) ifconfig_IF_ipv6 parameter does disable AUTO_LINKLOCAL, but too late, because network.subr issues 'ifconfig inet -ifdisabled' before.

Attach patch introduces check for -auto_linklocal at that point.

-harry
Comment 1 Andriy Voskoboinyk freebsd_committer 2019-01-27 19:30:40 UTC
Assign to the proper list
Comment 2 Eugene Grosbein freebsd_committer 2019-01-28 03:30:59 UTC
Created attachment 201467 [details]
revised patch

Thank you for submission. Please verify if attached version of patch works same way. It avoids exta forking and extra invocation of grep.
Comment 3 Harald Schmalzbauer 2019-01-28 08:06:11 UTC
(In reply to Eugene Grosbein from comment #2)

Thanks a lot for taking care and the more sophisticated patch, but I'm busy with completely unrelated stuff. Probably I'll be able to test by the end of this week.

Thanks,
-harry