Bug 292164 - llan0 doesn't allow dhclient until an IP is provided on the interface
Summary: llan0 doesn't allow dhclient until an IP is provided on the interface
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: powerpc (show other bugs)
Version: 15.0-RELEASE
Hardware: powerpc Any
: --- Affects Some People
Assignee: Justin Hibbits
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-03 20:31 UTC by Adrian Chadd
Modified: 2026-05-20 02:00 UTC (History)
3 users (show)

See Also:
ivy: mfc-stable15?
ivy: mfc-stable14?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Chadd freebsd_committer freebsd_triage 2026-01-03 20:31:22 UTC
When running freebsd a a pseries guest with a SPAPR network interface, we have some weird behaviour.


```
root@:~ # dmesg | grep llan0
llan0: <POWER Hypervisor Virtual Ethernet> irq 16781570 on vdevice0
llan0: Ethernet address: 52:54:00:93:82:ce
llan0: link state changed to UP
root@:~ # 
```

and

```
root@:~ # sysctl dev.llan.0
dev.llan.0.%iommu: 
dev.llan.0.%parent: vdevice0
dev.llan.0.%pnpinfo: name=l-lan compat=IBM,l-lan 
dev.llan.0.%location: 
dev.llan.0.%driver: llan
dev.llan.0.%desc: POWER Hypervisor Virtual Ethernet
```

ok, and

```
cpu0: IBM POWER9 revision 2.2, 3000.00 MHz
cpu0: Features dc007182<PPC32,PPC64,ALTIVEC,FPU,MMU,SMT,ISNOOP,ARCH205,ARCH206,VSX,TRUELE>
cpu0: Features2 bee00000<ARCH207,DSCR,ISEL,TAR,VCRYPTO,ARCH300,IEEE128,DARN>
real memory  = 4249452544 (4052 MB)
avail memory = 4063674368 (3875 MB)
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
```

It's a power9 pseries VM

ok, and


```
root@:~ # ifconfig llan0
llan0: flags=1008802<BROADCAST,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        options=0
        ether 52:54:00:93:82:ce
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@:~ # 
```

but when i run dhclient ...


```
root@:~ # dhclient llan0
DHCPDISCOVER on llan0 to 255.255.255.255 port 67 interval 8
Jan  3 20:30:06  dhclient[1594]: send_packet: Network is down
^C
root@:~ # Jan  3 20:30:08  dhclient[1594]: connection closed
Jan  3 20:30:08  dhclient[1594]: exiting.

root@:~ # ifconfig llan0
llan0: flags=1008803<UP,BROADCAST,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        options=0
        ether 52:54:00:93:82:ce
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@:~ # 
```

however, programming in /an/ IP address works, and programming in an IP address and then runnign dhclient works, ie

```
root@:~ # ifconfig llan0 inet 0.0.0.0/24
root@:~ # dhclient llan0
DHCPDISCOVER on llan0 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 192.168.100.1
DHCPREQUEST on llan0 to 255.255.255.255 port 67
DHCPACK from 192.168.100.1
bound to 192.168.100.179 -- renewal in 1800 seconds.
root@:~ # ifconfig llan0
llan0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        options=0
        ether 52:54:00:93:82:ce
        inet 192.168.100.179 netmask 0xffffff00 broadcast 192.168.100.255
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@:~ # 
```
Comment 1 Adrian Chadd freebsd_committer freebsd_triage 2026-01-03 20:34:07 UTC
also

```
FreeBSD  15.0-RELEASE FreeBSD 15.0-RELEASE releng/15.0-n280995-7aedc8de6446 GENERIC powerpc
```
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-04-24 02:28:00 UTC
A commit in branch main references this bug:

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

commit 74dff310698b9a4da9804ed0ded00428b0aebbe8
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-04-23 03:12:37 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-04-24 02:24:13 +0000

    pseries/llan: call init when ioctl sets interface UP

    This should fix dhcp on an unitialized interface.  This solution was
    found while comparing against another driver, SIOCSIFFLAGS is used by
    dhclient to force the interface up before it has an IP address.
    However, all setup work is done in llan_init(), so the interface would
    not be enabled if configured via only the SIOCSIFFLAGS ioctl.  By
    running llan_init() when the interface is forced up via SIOCSIFFLAGS,
    the interface is initialized properly.

    PR:             292164

 sys/powerpc/pseries/phyp_llan.c | 4 ++++
 1 file changed, 4 insertions(+)
Comment 3 Dennis Camera 2026-05-03 11:08:00 UTC
Thank you for looking at this, Justin.

I've just made a quick test with FreeBSD-16.0-CURRENT-powerpc-powerpc64-20260428-551d47c5677a-285508-bootonly.iso and it works as expected now.
Comment 4 Adrian Chadd freebsd_committer freebsd_triage 2026-05-04 02:07:12 UTC
ok, should mfc this to 15 and 14, then we can close
Comment 5 Lexi Winter freebsd_committer freebsd_triage 2026-05-19 09:53:07 UTC
^Triage: Set MFC flags.
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-05-20 01:54:03 UTC
A commit in branch stable/15 references this bug:

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

commit 237e851009e81f519a0fcb57220cff0d35223b88
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-04-23 03:12:37 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-05-20 01:52:50 +0000

    pseries/llan: call init when ioctl sets interface UP

    This should fix dhcp on an unitialized interface.  This solution was
    found while comparing against another driver, SIOCSIFFLAGS is used by
    dhclient to force the interface up before it has an IP address.
    However, all setup work is done in llan_init(), so the interface would
    not be enabled if configured via only the SIOCSIFFLAGS ioctl.  By
    running llan_init() when the interface is forced up via SIOCSIFFLAGS,
    the interface is initialized properly.

    PR:             292164
    (cherry picked from commit 74dff310698b9a4da9804ed0ded00428b0aebbe8)

 sys/powerpc/pseries/phyp_llan.c | 4 ++++
 1 file changed, 4 insertions(+)
Comment 7 commit-hook freebsd_committer freebsd_triage 2026-05-20 01:59:05 UTC
A commit in branch stable/14 references this bug:

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

commit 0b158de1109174cd5a189e244198ee02062984f0
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-04-23 03:12:37 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-05-20 01:55:31 +0000

    pseries/llan: call init when ioctl sets interface UP

    This should fix dhcp on an unitialized interface.  This solution was
    found while comparing against another driver, SIOCSIFFLAGS is used by
    dhclient to force the interface up before it has an IP address.
    However, all setup work is done in llan_init(), so the interface would
    not be enabled if configured via only the SIOCSIFFLAGS ioctl.  By
    running llan_init() when the interface is forced up via SIOCSIFFLAGS,
    the interface is initialized properly.

    PR:             292164
    (cherry picked from commit 74dff310698b9a4da9804ed0ded00428b0aebbe8)

 sys/powerpc/pseries/phyp_llan.c | 4 ++++
 1 file changed, 4 insertions(+)
Comment 8 Justin Hibbits freebsd_committer freebsd_triage 2026-05-20 02:00:03 UTC
Changes have been MFC'd to stable/15 and stable/14.