Bug 223407

Summary: [patch] etc/network.subr invalidates -auto_linklocal ifconfig flag set via rc.conf
Product: Base System Reporter: Harald Schmalzbauer <bugzilla.freebsd>
Component: confAssignee: freebsd-net mailing list <net>
Status: New ---    
Severity: Affects Many People CC: avos, eugen
Priority: --- Keywords: patch
Version: 11.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Make rc(8) respect "-auto_linklocal" flag for INET6 ifconfig
none
revised patch none

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