wrong default route on system with ethernet and wifi

"Thomas Seeling" ([email protected] via lfs-support Mailing List) <[email protected]> Wed, 8 Oct 2025 11:39:24 +0000
Newsgroups gmane.linux.lfs.support
Message-ID <trinity-643c9d7f-fea7-4dee-815a-8f8a68166c3f-1759923563871@trinity-msg-rest-gmx-gmx-live-654c5495b9-ms879>
Hallo dear list,

I built the latest LFS 12.4-r33 on a Thinkpad laptop with both ethernet and wifi network capabilities.
Everything was fine, I could boot into the new system and start building some packages from BLFS.

This too was fine, until I reached wpa_supplicant. The build was good, everything worked, until I pulled the ethernet cable.
For testing I disabled the wifi interface with ifdown, then tried to restart wifi only.
This failed because the default route was still set to the ethernet connection and `ifup` refused to switch it to wifi.

In the `ifup` script this is done by checking the result of `ip route | grep default`.
Imho this check should include that the interface is up and only if *both* conditions are true, the refusal is sound.
In any other case, i.e. either no default route or interface not up, it should accept the *new* default route.

Of course the academic solution is to cleanly deactivate ethernet with `ifdown`, then `ifup` the wifi interface.
In real life sh*t happens and if I only do `ifup wifi0` I'd wish it to really set the default route, too.

Stay healthy,
Thomas
-- 
"Do you wanna be a legend or a passing footprint on the sands of time?"

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page