Tiny Core Linux
Tiny Core Base => Corepure64 => Topic started by: FlyingDutchman on March 06, 2021, 07:23:50 AM
-
Hi,
In release 12, whenever I try to traceroute, to any destination, I get an error:
command: $ traceroute 8.8.8.8
response: traceroute: NO OPT x!
-
Hi FlyingDutchman
Are you sure that wasn't !X ? According to the man page:
!X (communication administratively prohibited)
Found here:
https://linux.die.net/man/8/traceroute
But from that terse description, I don't know who's prohibiting it.
You could see if using sudo solves your problem. You could also try using either:
traceroute -I 8.8.8.8
or:
traceroute -T 8.8.8.8
-
Are you using traceroute from busybox or the inetutils or traceroute extensions?
-
Hi @Rich and @Juanito,
I double checked and the error is
traceroute: NO OPT x!
including the capitals. I couldn't find anything on Google that matches this error.
I tested with -I and -T option, but these are ignored as these options are not supported. I also tested with and without sudo, with the same result.
I'm using the busybox version, traceroute --help returns:
BusyBox v1.33.0 (2021-01-17 14:53:59 UTC) multi-call binary.
I very briefly tried to find the source code of BusyBox to do a text search for the error and find out what triggers it. I'll put some more effort in it, as it doesn't seem to be a very obvious issue.
-
commit f3a55b306ed3 looks relevant
"traceroute: fix option parsing"
-
I found the "NO OPT" message in the source files. file libbb/getopt32.c, line 473. For some reason I keep getting "Internal server error" if I try to paste the code on this forum, so here's the link:
https://git.busybox.net/busybox/tree/libbb/getopt32.c?h=1_33_stable
As far as I understand C (which is not far at all....), @curaga I think you are right and this is related to the commit you found.
-
I attached the patch if you'd like to try it:
http://tinycorelinux.net/12.x/x86/release/src/busybox/compile_busybox
-
I downloaded the Busybox source code, applied the existing patches and the new patch and compiled on a release 11 VM according to instructions. I then squashed it into a .tcz and added the package to a release 12 VM. As a package, it doesn't overwrite the busybox installation from the root file system, I had to manually swap the busybox and busybox.suid binaries from the root fs with the ones from the package.
And it works! traceroute works fine with this patch.
BTW: for applying patches I saw that some get applied with -Np0 flags, others with -Np1 flags. I gambled on -Np1 and it works, but what does this flag actually do?
-
Assuming the file to be patched is subdir1/subdir2/subdir3/file:
p0 means use the full path to the file to be patched
p1 means use subdir2/subdir3/file
N means if the file looks like it has been patched already, don't automatically reverse it.
-
Reported it to busybox, for a future 1.33.1 release.