<div dir="ltr">Hi guys:<div><br></div><div>Recently, I just got in touch with toybox. And I have some puzzles about ping implementation.</div><div><br></div><div>(1) toybox uses unprivileged ICMP sockets to avoid unnecessary root privilege. </div><div>However, it depends highly on kernel support. I can not use ping since my kernle is not linux and it does not support such usage.</div><div><br></div><div>(2) toybox uses unprivileged ICMP but does not set socket with flag <span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">IP_HDRINCL. </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">So, it is impossible to get ttl info when gets reply from aim host since we can not get ip header. Currently toybox will print "ttl = 0".</span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">I wonder if it is a balance of simple and feature.</span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"><br></span></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace"><span style="font-size:12px;white-space:pre">I assume there are some reasons I do not find. So, i just send a patch to fix some trivial issues in ping.c. Hope someone can solve my puzzles.</span></font></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace"><span style="font-size:12px;white-space:pre"><br></span></font></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace"><span style="font-size:12px;white-space:pre">best wishes.</span></font></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"> </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"><br></span></div></div>