Bug 159846 - [rc.conf] routing_stop_inet6() logic doesn't handle ipv6_network_interfaces properly
Summary: [rc.conf] routing_stop_inet6() logic doesn't handle ipv6_network_interfaces p...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 9.0-BETA1
Hardware: Any Any
: Normal Affects Some People
Assignee: Hiroki Sato
Depends on:
Reported: 2011-08-17 21:30 UTC by Enji Cooper
Modified: 2021-09-10 14:38 UTC (History)
1 user (show)

See Also:
ngie: mfc-stable11+
ngie: mfc-stable10+
ngie: mfc-stable9?

rc.d-routing-should-translate-ipv6-interfaces-properly.patch.txt (383 bytes, TEXT/PLAIN; charset=US-ASCII)
2012-12-03 07:41 UTC, Enji Cooper
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2011-08-17 21:30:09 UTC
As stated in /etc/defaults/rc.conf...

### IPv6 options: ###
ipv6_network_interfaces="auto"  # List of IPv6 network interfaces
                                # (or "auto" or "none").

So, the only accepted values are auto and none.

This doesn't make sense though when used in routing_stop_inet6 though:

        local i

        route -n flush -inet6
        for i in ${ipv6_network_interfaces}; do
               ifconfig $i inet6 -defaultif

Currently it's cosmetic noise, for the most part, but this also doesn't remove the default interface value either properly.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-08-17 22:26:54 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Perhaps the users on this list can comment.
Comment 2 Enji Cooper freebsd_committer 2012-12-03 07:41:37 UTC
 	This patch fixes the problem.
Comment 3 Enji Cooper freebsd_committer 2017-01-03 06:08:00 UTC
Fixed on ^/head - ^/stable/10:

230991        hrs       for i in `list_net_interfaces`; do
230991        hrs               if ipv6if $i; then
230991        hrs                       ifconfig $i inet6 -defaultif
230991        hrs               fi
197139        hrs       done

but not ^/stable/9:

197139        hrs       for i in ${ipv6_network_interfaces}; do
197139        hrs               ifconfig $i inet6 -defaultif
197139        hrs       done

$ svn log -c 230991
r230991 | hrs | 2012-02-04 10:14:49 -0800 (Sat, 04 Feb 2012) | 5 lines

Fix $ipv6_network_interfaces handling in rc.d/routing.  It could fail when
it was set to "auto", for example.

MFC after:      3 days

I don't think it's worth pursuing on ^/stable/9 though, given that it's EOL.