Package: netspeed Version: 0.15.2-1 Severity: normal Tags: patch When netspeed is told to use the default interface, it selects the first interface from /proc/net/route that has a gateway of 0.0.0.0, which is wrong. It should select the first interface that has a destination IP of 0.0.0.0, as that would be the default route.
-- System Information: Debian Release: squeeze/sid APT prefers karmic-updates APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32.2-hyperzen1 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_SG.UTF-8, LC_CTYPE=en_SG.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages netspeed depends on: ii libart-2.0-2 2.3.20-2 Library of functions for 2D graphi ii libatk1.0-0 1.28.0-0ubuntu1 The ATK accessibility toolkit ii libbonobo2-0 2.24.2-1 Bonobo CORBA interfaces library ii libbonoboui2-0 2.24.2-1ubuntu2 The Bonobo UI library ii libc6 2.10.1-0ubuntu15 GNU C Library: Shared libraries ii libcairo2 1.8.8-2ubuntu1 The Cairo 2D vector graphics libra ii libfontconfig1 2.6.0-1ubuntu12 generic font configuration library ii libfreetype6 2.3.9-5 FreeType 2 font engine, shared lib ii libgconf2-4 2.28.0-0ubuntu2 GNOME configuration database syste ii libglib2.0-0 2.22.3-0ubuntu1 The GLib library of C routines ii libgnome2-0 2.28.0-0ubuntu3 The GNOME library - runtime files ii libgnomecanvas2-0 2.26.0-1 A powerful object-oriented display ii libgtk2.0-0 2.18.3-1ubuntu2 The GTK+ graphical user interface ii libgtop2-7 2.26.1-0ubuntu1 gtop system monitoring library ii liborbit2 1:2.14.17-0.1 libraries for ORBit2 - a CORBA ORB ii libpanel-applet2-0 1:2.28.0-0ubuntu6 library for GNOME Panel applets ii libpango1.0-0 1.26.0-1 Layout and rendering of internatio ii libpopt0 1.14-4 lib for parsing cmdline parameters netspeed recommends no packages. netspeed suggests no packages. -- no debconf information
diff -Nur -x '*.orig' -x '*~' netspeed-0.15.2/src/backend.c netspeed-0.15.2.new/src/backend.c --- netspeed-0.15.2/src/backend.c 2008-09-08 01:07:26.000000000 +0800 +++ netspeed-0.15.2.new/src/backend.c 2009-12-23 19:33:42.085011004 +0800 @@ -103,7 +103,7 @@ if (retval != 11) continue; - if (gw == 0 && !is_dummy_device(device)) { + if (ip == 0 && !is_dummy_device(device)) { fclose(fp); return device; }