traceroute: unknown protocol icmp: No such file or directory

Rob Landley rob at landley.net
Fri Sep 22 21:19:59 UTC 2006


On Friday 22 September 2006 8:47 am, Thomas d'Otreppe wrote:
> I got this error a few days ago while testing all busybox applets:
> "traceroute: unknown protocol icmp: No such file or directory" and I
> just wanted to share the solution. I think it worth to be in FAQ ;).

Yeah, that's one of Vladimir's old applets.  To quote from the big long 
comment at the start of the file:

>  * Don't use this as a coding example.  I was trying to find a
>  * routing problem and this code sort-of popped out after 48 hours
>  * without sleep.  I was amazed it ever compiled, much less ran.

I think that sums the situation up pretty well, actually...

> Then by reading "man getprotobyname", I discovered that it was because
> the function didn't find anything in /etc/protocols corresponding to
> icmp (and also that this file doesn't exist [it explain the last part
> of the error]). I simply copied /etc/protocols and it worked.

It really shouldn't be doing that.

Thanks for the bug report, I'll add it to the TODO heap...

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list