aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2026-04-23 03:12:37 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2026-04-24 02:24:13 +0000
commit74dff310698b9a4da9804ed0ded00428b0aebbe8 (patch)
tree21ad9301a614da42341bd34e8b18744eae0bb541
parent32b0dfb326593b8dae31cc2bdc1e2d08ea70e9d7 (diff)
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
-rw-r--r--sys/powerpc/pseries/phyp_llan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/pseries/phyp_llan.c b/sys/powerpc/pseries/phyp_llan.c
index 4ba4549a9cf5..763eebc15b36 100644
--- a/sys/powerpc/pseries/phyp_llan.c
+++ b/sys/powerpc/pseries/phyp_llan.c
@@ -547,6 +547,10 @@ llan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
err = ifmedia_ioctl(ifp, (struct ifreq *)data, &sc->media, cmd);
break;
case SIOCSIFFLAGS:
+ if ((if_getflags(ifp) & IFF_UP) &&
+ !(if_getdrvflags(ifp) & IFF_DRV_RUNNING))
+ llan_init(sc);
+ break;
default:
err = ether_ioctl(ifp, cmd, data);
break;