Mtr

mtr dosnt work without ipv6

Bug #1149097 reported by navidR on 2013-03-06
62
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Mtr
Undecided
Unassigned

Bug Description

Description:
mtr crashes on host with single ipv4 stack. IPv6 turned off by kernel boot params ipv6.disable=1. This happens even if you explicitly specify option "-4". Program crashes with message:
"Unable to allocate IPv6 socket for nameserver communication: Address family not supported by protocol"

Additional info:
* package version(s)
extra/mtr 0.83-1

* config and/or log files etc.
Unable to allocate IPv6 socket for nameserver communication: Address family not supported by protocol

Steps to reproduce:
mtr <any ip address>
on host without ipv6 tcp/ip stack.

dcelasun (dcelasun) wrote :

I can confirm this is indeed the case with mtr 0.83.

MrIGI (ilkevich) wrote :

This bug made mtr absolutely unusable. Please fix ASAP.

Rashid N. Achilov (citycat4) wrote :

No help when use --disable-ipv6. Mtr crash on build in:

curses.c: In function 'mtr_curses_hosts':
curses.c:318: error: invalid initializer
gmake[2]: *** [curses.o] Error 1
gmake[2]: Leaving directory `/usr/ports/net/mtr/work/mtr-0.84'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/net/mtr/work/mtr-0.84'
gmake: *** [all] Error 2
*** Error code 1

This line is:

      struct in6_addr addr6 = *addr;

Next lines is simply convert IP address in textual representation.

Antonio Querubin (aaq) wrote :

Associated with ASN lookup code which was buggy. Patch submitted.

Hans-Cees Speel (hanscees) wrote :

same error here. Mtr is my most important tool. Now completely useless.

Please fix!

James Davion (rr369td6) wrote :

Hello,

you can get the tar.gz then coment the following lines in curses.c and manually compile mtr. This fixes it. I just did this and works.

~~~cut here~~~

[root@DeathWing mtr-0.84]# grep "//" curses.c
// struct in6_addr addr6 = *addr;
// ipv4[0] = addr6.s6_addr[0];
// ipv4[1] = addr6.s6_addr[1];
// ipv4[2] = addr6.s6_addr[2];
// ipv4[3] = addr6.s6_addr[3];

[psycho@DeathWing ~]$ mtr google.com -r -c 10
Start: Tue Apr 30 14:59:38 2013
HOST: DeathWing.PCLinuxOS.rebelne Loss% Snt Last Avg Best Wrst StDev
  1.|-- gw100.bucuresti.rdsnet.ro 0.0% 10 257.5 27.4 0.5 257.5 80.9
  2.|-- dr32.bucuresti.rdsnet.ro 0.0% 10 1.0 0.8 0.4 2.2 0.3
  3.|-- cache.google.com 0.0% 10 1.6 0.7 0.3 1.6 0.3
[psycho@DeathWing ~]$ mtr -v
mtr 0.83
[psycho@DeathWing ~]$

~~~and here~~~

Hope it helps.

Patrick Goetz (pgoetz) wrote :

> you can get the tar.gz then coment the following lines in curses.c and manually compile mtr.

Yes, but this is a hack. Can we expect this to be fixed in general in the next release?

On Wed, 16 Jul 2014, Patrick Goetz wrote:

> Yes, but this is a hack. Can we expect this to be fixed in general in
> the next release?

On what OS and version is this bug showing up?

Antonio Querubin
e-mail: <email address hidden>
xmpp: <email address hidden>

Hassan El Jacifi (waver) wrote :

mtr -s 1000 -r -c 1000 -4 google.com
Start: Fri Aug 15 09:31:02 2014
Unable to allocate IPv6 socket for nameserver communication: Address family not supported by protocol

Changed in mtr:
status: New → Confirmed
Hassan El Jacifi (waver) wrote :

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

Package version: mtr 0.85-2

Antonio Querubin (aaq) wrote :

On Fri, 15 Aug 2014, Hassan El Jacifi wrote:

> lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 14.04.1 LTS
> Release: 14.04
> Codename: trusty
>
> Package version: mtr 0.85-2

Looks like this is already fixed in the source but awaiting the next
release.

Antonio Querubin
e-mail: <email address hidden>
xmpp: <email address hidden>

Micah Cowan (micahcowan) wrote :

For posterity, the specific change upstream that appears to be intended to address this, is at
https://github.com/traviscross/mtr/commit/12c53f98e44598b87d3f2308e0d892f49d7af8e4

Antonio Querubin (aaq) wrote :

On Fri, 19 Sep 2014, Micah Cowan wrote:

> For posterity, the specific change upstream that appears to be intended
> to address this, is at
> https://github.com/traviscross/mtr/commit/12c53f98e44598b87d3f2308e0d892f49d7af8e4

If we replace the current resolver code with the simpler scheme used in
the newdns branch, the problem may become moot. I've been running the
newdns branch on a number of systems and so far it's looking good.

Antonio Querubin
e-mail: <email address hidden>
xmpp: <email address hidden>

remort (master-remort) wrote :

As for me i solved it in a following way:
1. download working 0.75 version of the mtr here: https://launchpad.net/ubuntu/jaunty/i386/mtr-tiny/0.75-2
2. do an 'sudo aptitude remove mtr mtr-tiny'
3. install downloaded mtr 0.75 deb package.
4. set mtr on hold with exactly this command: "sudo apt-mark hold mtr-tiny:i386".

It's a shame for ubuntu to have buggy software in an LTS 14.04 distribution for such a long time.
If you can't get 0.86 release of mtr for any reason, replace broken version with 0.75 version at least.

At moments like this I can't say that 'ubuntu is for everyone'.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers