[Bug 292604] netwait always warns of lack of network functionality
| Newsgroups | gmane.os.freebsd.devel.net |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292604 Jeremy Chadwick <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from Jeremy Chadwick <[email protected]> --- I am the original author of the netwait script. dougb vetted it. It's a very sensitive shell script that has unforeseen effects depending on various network configurations (especially FreeBSD users relying on VLANs). Both Doug and I spent a long time getting it right for everyone. Yes it's just a shell script, but how it works / the edge cases are not immediately obvious. I upgraded my single remaining FreeBSD system from 14.3 to 14.4 then 15.0 and 15.1 and saw the /etc/rc warning. Needless to say I am quite irritated. The commits that broke this is https://github.com/freebsd/freebsd-src/commit/5ead817c3b7af6d6b5fea222ab144db2c3167b22 dated October 2025. Author is des. Please test things thoroughly before pushing to src. It only takes 3 lines to verify proper behaviour: netwait_enable="yes" netwait_ip="8.8.8.8 4.2.2.1" netwait_if="IFACE_NAME" Followed by /etc/rc.d/netwait start. That's it. Not hard. While I'm here: Commit https://github.com/freebsd/freebsd-src/commit/630c9dba7a2479dbc60858eb94125fb315128b88 -- 11 years ago -- added comments to the top of the script -- specifically lines 9 through 17 -- that tell users who use DHCP to use synchronous_dhclient="yes" instead of netwait, and that this is mainly for static IP systems. THIS IS WRONG. I repeat, clearly: THIS IS WRONG. The author of these comments does not understand what this script is for and what the purpose is. The purpose is to verify ACTUAL REAL-WORLD NETWORK CONNECTIVITY is functional _prior_ to the rest of the rc.d framework/dependencies continuing on. There are tons of daemons that require actual functional networking layer before they should start. Just because DHCP/dhclient can sit and wait until it exits cleanly DOES NOT mean the rest of the network (esp. uplink) is actually functional at that point. It checks network link state, but it also uses ping -- which is the critical part. The entire point of the ping is to tests real-world packet flow (preferably to an endpoint that is off-network, e.g. Internet, but everyone's use-case varies). Furthermore, static IP vs. DHCP has absolutely no relevancy to the purpose of this script. These comments are completely wrong and misleading, and thus should be removed. I have no complaints about the REQUIRE change, or the use of iterating over multiple interfaces. It's the comments that are wrong. -- You are receiving this mail because: You are the assignee for the bug.