Page MenuHomeFreeBSD

IPv6: Set ifdisabled in the kernel rather than in rc
ClosedPublic

Authored by bz on Nov 22 2020, 10:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 11:42 PM
Unknown Object (File)
Oct 20 2024, 10:56 AM
Unknown Object (File)
Oct 20 2024, 10:56 AM
Unknown Object (File)
Oct 20 2024, 10:56 AM
Unknown Object (File)
Oct 20 2024, 10:16 AM
Unknown Object (File)
Oct 3 2024, 12:02 PM
Unknown Object (File)
Sep 13 2024, 10:53 AM
Unknown Object (File)
Sep 13 2024, 10:53 AM

Details

Summary

Enable ND6_IFF_IFDISABLED when the interface is created in the
kernel before return to user space.

This avoids a race when an interface is create by a program which
also calls ifconfig IF inet6 -ifdisabled and races with the
devd -> /etc/pccard_ether -> .. netif start IF -> ifdisabled
calls (the devd/rc framework disabling IPv6 again after the program
had enabled it already).

In case the global net.inet6.ip6.accept_rtadv was turned on,
we also default to enabling IPv6 on the interfaces, rather than
disabling them.

Reported by: Gert Doering (gert greenie.muc.de)
PR: 248172
Reviewed by:
MFC after: ???
Diff Review: ...

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Nov 22 2020, 10:22 PM
bz created this revision.
glebius added a subscriber: glebius.
glebius added inline comments.
sys/netinet6/nd6.c
276 ↗(On Diff #79871)

on the loopback interfaces

This revision is now accepted and ready to land.Nov 23 2020, 4:51 PM
sys/netinet6/nd6.c
276 ↗(On Diff #79871)

on the loopback interfaces

please ignore :)

Not sure why I'm asked to review this, not exactly my specialty, but it looks OK and sounds sensible.

In D27324#610809, @phk wrote:

Not sure why I'm asked to review this, not exactly my specialty, but it looks OK and sounds sensible.

@phk If I am not mistaken it was you who got us into the entire "I go to a conference and IPv6 is enabled on the wifi and I'll just have it and not be aware of it" original sysctls, so this flag pretty much exists because of you (unless of course I misremember). Good enough reason to add you to review ;-)

This revision was automatically updated to reflect the committed changes.