According to bug 195502, netwait does not work with IPv6.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
I've only moved that script last 8 years or so ago. Adding appropriate groups for reviewers.
If we do this one defaultroute would also be another good script to make aware of IPv6.
Also one could just use ping -4 and ping -6 without checking first if the IP is valid v4 or v6. As we are only interested when the exit status is successful?
libexec/rc/rc.d/netwait | ||
---|---|---|
91 | I would pedantically use ping -4 here. | |
92 | We might want to add a \. to the grep pattern, in order to also match IPv4-Embedded IPv6 addresses. |
Actually, have you tried the script on a currently supported version of FreeBSD? It should work without any modifications. The bug was reported before the unification of ping6 with ping (D21377).
You're right. It works on current version of FreeBSD. This was sparked by someone trying to use `netwait` inside of a jail, which it is not initially designed for.