traceroute: unknown protocol icmp: No such file or directory

Thomas d'Otreppe tdotreppe at gmail.com
Fri Sep 22 12:47:12 UTC 2006


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 ;).

I googled a lot and I didn't find any solution on internet. So, I
started looking at the sources to see what's wrong (searching "unknown
protocol" string).

I found it and I saw that it was a call to getprotobyname that failed.
I was surprised to see it failing because traceroute worked everytime
on all my systems.

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 may also affects other applets calling that function.

Regards,

Thomas



More information about the busybox mailing list