Bug 271661

Summary: NETLINK: static IPv6 configuration fails after base 4bf44dd73bc0
Product: Base System Reporter: Evgenii Khramtsov <2khramtsov>
Component: binAssignee: Alexander V. Chernikov <melifaro>
Status: Closed FIXED    
Severity: Affects Some People CC: melifaro
Priority: ---    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Evgenii Khramtsov 2023-05-26 21:02:42 UTC
ifconfig_vtnet0_ipv6="inet6 2001:db8:2:2:0:ff48:42ff:161f/64"
ipv6_default_interface="vtnet0"
ipv6_defaultrouter="2001:db8:2:2::7"

in rc.conf(5) makes node unreachable after reboot and ssh login.

* FreeBSD-runtime package causes failure, no difference with full upgrade
* base f5abdb03119a with base 6d204407ec6e reverted fails
* base f5abdb03119a with base 6d204407ec6e and base 4bf44dd73bc0 reverted works
* node runs MINIMAL-based kernel and world both built without IPv4 support

Providing reproducer is tedious, would consider only if non-reproducible.
Comment 1 Evgenii Khramtsov 2023-05-26 21:10:35 UTC
* Nodes with SLAAC via "inet6 accept_rtadv" run fine here.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-05-27 10:45:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=dfc15e761b84c6dcaee68a18e8077058479c928f

commit dfc15e761b84c6dcaee68a18e8077058479c928f
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2023-05-27 10:38:32 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-05-27 10:38:32 +0000

    netlink: call IPv6 hook after the ifaddr operation when ifp is brought
    up.

    This change fixes the case when the first address added to the interface
     is IPv6 GU address. Before the change, IPv6 LL addition was not
    triggered.

    PR: 271661
    MFC after:      2 weeks

 sys/netlink/route/iface.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
Comment 3 Alexander V. Chernikov freebsd_committer freebsd_triage 2023-05-27 10:47:53 UTC
Thank you for the report!

I was able to reproduce it, please check if the committed change fixes the issue for you.
Comment 4 Evgenii Khramtsov 2023-05-27 12:29:06 UTC
I confirm, works fine after base dfc15e761b84.