Page MenuHomeFreeBSD

Add IPv6 support to /etc/rc.d/netwait
Needs ReviewPublic

Authored by dudleyi_yahoo.com on Feb 23 2025, 6:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 9, 5:45 AM
Unknown Object (File)
Mon, Apr 7, 6:10 PM
Unknown Object (File)
Mar 7 2025, 2:13 AM
Unknown Object (File)
Mar 4 2025, 4:50 PM
Unknown Object (File)
Feb 26 2025, 1:57 PM
Unknown Object (File)
Feb 23 2025, 8:26 PM
Unknown Object (File)
Feb 23 2025, 6:54 PM
Unknown Object (File)
Feb 23 2025, 12:57 PM
Subscribers

Details

Reviewers
netchild
Group Reviewers
rc
network
Summary

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

dudleyi_yahoo.com retitled this revision from Add IPv6 support to netwait to Add IPv6 support to /etc/rc.d/netwait.
gbe added a subscriber: gbe.

Add reviewers that have worked on that script

Can you upload it with arc or diff -U99999 to have full context?

bz edited reviewers, added: rc, network; removed: bz.Feb 23 2025, 9:36 PM

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.