WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: traceroute doesn't work in release 12  (Read 5081 times)

Offline FlyingDutchman

  • Newbie
  • *
  • Posts: 36
traceroute doesn't work in release 12
« 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:
Code: [Select]
$ traceroute 8.8.8.8 response:
Code: [Select]
traceroute: NO OPT x!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
Re: traceroute doesn't work in release 12
« Reply #1 on: March 06, 2021, 08:00:24 AM »
Hi FlyingDutchman
Are you sure that wasn't  !X ? According to the man page:
Quote
!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:
Code: [Select]
traceroute -I 8.8.8.8or:
Code: [Select]
traceroute -T 8.8.8.8

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14755
Re: traceroute doesn't work in release 12
« Reply #2 on: March 06, 2021, 08:50:57 AM »
Are you using traceroute from busybox or the inetutils or traceroute extensions?

Offline FlyingDutchman

  • Newbie
  • *
  • Posts: 36
Re: traceroute doesn't work in release 12
« Reply #3 on: March 06, 2021, 12:14:05 PM »
Hi @Rich and @Juanito,

I double checked and the error is
Code: [Select]
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.

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11027
Re: traceroute doesn't work in release 12
« Reply #4 on: March 06, 2021, 12:33:04 PM »
commit f3a55b306ed3 looks relevant
"traceroute: fix option parsing"
The only barriers that can stop you are the ones you create yourself.

Offline FlyingDutchman

  • Newbie
  • *
  • Posts: 36
Re: traceroute doesn't work in release 12
« Reply #5 on: March 06, 2021, 02:06:52 PM »
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.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14755
Re: traceroute doesn't work in release 12
« Reply #6 on: March 07, 2021, 02:34:48 AM »

Offline FlyingDutchman

  • Newbie
  • *
  • Posts: 36
Re: traceroute doesn't work in release 12
« Reply #7 on: March 07, 2021, 03:59:59 PM »
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?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14755
Re: traceroute doesn't work in release 12
« Reply #8 on: March 08, 2021, 12:07:59 AM »
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.

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11027
Re: traceroute doesn't work in release 12
« Reply #9 on: March 08, 2021, 02:06:00 AM »
Reported it to busybox, for a future 1.33.1 release.
The only barriers that can stop you are the ones you create yourself.