Summary: | sbin/ping: tries to use IPv6 on INET6-less kernels | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Jan Beich <jbeich> | ||||||
Component: | bin | Assignee: | Alan Somers <asomers> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | asomers | ||||||
Priority: | --- | Keywords: | regression | ||||||
Version: | CURRENT | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Jan Beich
2020-12-10 12:10:31 UTC
Good catch. I'll fix it. In the meantime, you can use "ping -4" Created attachment 221094 [details]
Fix ping when the kernel lacks INET6 support
jbeich, could you please review and test this patch?
Created attachment 221097 [details] Fix ping when the kernel lacks INET6 support, v2 Please, use git-format-patch(1) to facilitate amending patches. (In reply to Alan Somers from comment #2) > review Use feature_present(3) instead of poking kern.features.* directly. I don't know much about base/ style otherwise. > test Works for me. Thanks for the feature_present change. That does look better now. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b586c66baf4824d175d051b3f5b06588c9aa2bc8 commit b586c66baf4824d175d051b3f5b06588c9aa2bc8 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2021-01-01 17:25:49 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2021-01-01 17:25:49 +0000 ping: fix ping when the kernel was built without INET6 If the kernel was built without INET6, default to ICMP. Or, if it was built without INET, default to ICMPv6. PR: 251725 Reported by: jbeich Reviewed by: jbeich Tested by: jbeich MFC with: 368045 sbin/ping/main.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) Fixed. No plans to MFC. |