Bug 254445 - cloned_interfaces="bridge0" does not respect net.inet6.ip6.auto_linklocal
Summary: cloned_interfaces="bridge0" does not respect net.inet6.ip6.auto_linklocal
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Lexi Winter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-20 22:15 UTC by John W. O'Brien
Modified: 2025-05-19 12:51 UTC (History)
6 users (show)

See Also:
ivy: mfc-stable14?
john: mfc-stable13?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2021-03-20 22:15:33 UTC
Expected behavior
-----------------

When creating a IPv6-enabled bridge interface, the AUTO_LINKLOCAL flag will be set automatically, and the interface will be assigned a link-local address.

Observed behavior
-----------------

The IPv6-enabled bridge interface does not have a link-local address, even if a globally-unique address is assigned to affirm the IPv6 intent.

First observed on 12.1-RELEASE amd64, observed again on 12.2-RELEASE-p4 amd64, reproduced on 13.0-RC3 aarch64 EC2 AMI.

Steps to reproduce
------------------

Verify that net.inet6.ip6.auto_linklocal==1.

Set cloned_interfaces="bridge0" and reboot.

Verify that AUTO_LINKLOCAL is not set on bridge0.

Then set ifconfig_bridge0_ipv6="inet6 2001:db8::1/64" and reboot.

Verify that AUTO_LINKLOCAL is not set on bridge0.

Note that AWS AMIs set ipv6_activate_all_interfaces="YES" by default.
Comment 1 Kristof Provost freebsd_committer freebsd_triage 2021-03-20 22:44:35 UTC
This appears to be intentional: https://cgit.freebsd.org/src/commit/?id=af8056441e3f7ef883f0682cbbc5ee33d0975c2f

I'm not sure I understand why though, so I've cc'd the original authors.
Comment 2 Lexi Winter freebsd_committer freebsd_triage 2025-05-19 03:30:57 UTC
since we don't enable IPv6 on interfaces by default, the only way a bridge can lose the IFDISABLED flag is if the user explicitly configured the system that way, in which case it doesn't make sense to me to not auto-configure link-local addresses in the same way as every other interface.

so, i think we should remove this exception and handle bridges the same way as other interfaces.  

i suspect the original behaviour is related to the link-local address scope violation described in the "IPv6 support" section of the bridge(4) manual page, but since allow_llz_overlap is set to 0 by default, it would require explicit admin intervetion to end up with the broken configuration.
Comment 3 Lexi Winter freebsd_committer freebsd_triage 2025-05-19 11:40:18 UTC
proposed patch: https://reviews.freebsd.org/D50415
Comment 4 Seyed Pouria Mousavizadeh Tehrani 2025-05-19 12:46:28 UTC
Interestingly enough, I faced the same behaviour yesterday. However, This behaviour is documented in manual.
IF_BRIDGE(4):
Note that ACCEPT_RTADV and AUTO_LINKLOCAL interface flags are not enabled
by default on if_bridge interfaces even when net.inet6.ip6.accept_rtadv
and/or net.inet6.ip6.auto_linklocal is set to 1

As kristof said, it's intentional.
The workaround is to add a interface memeber to it and set the auto_linklocal flag.
ifconfig_bridge0_ipv6="auto_linklocal addm IF"
Comment 5 Lexi Winter freebsd_committer freebsd_triage 2025-05-19 12:51:46 UTC
yes, it's intentional, but it's wrong.