Package: guessnet
Version: 0.52-1
Severity: important
Tags: patch

It appears that the interface argument is being ignored when operating
in ifupdown mode.  This causes detection for interfaces other than eth0
(the default) to fail.

Perhaps my understanding of how the interface is determined is incorrect
and it is determined by another mechanism when in ifupdown mode and I
am overlooking it.  The specific error that inspired me to try to track
this down was that guessnet printed the following when attempting
detection for wlan0:

Operation not supported. Context:
    running the scan.  Quitting IWScan thread.

I tracked the result of this error to IWScan being invoked for eth0
rather than wlan0 and came to the above conclusion about the
interface specified on the command line being ignored.  If this
conclusion is in error, I can provide more diagnostic information
about this particular error message to help track down an alternate
cause.

I have attached a patch which works for me (by checking for the
interface command line argument in all cases).

Cheers,
Kevin


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.3-kevinoid1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages guessnet depends on:
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.4.2-9  GCC support library
ii  libiw30                       30~pre9-4  Wireless tools - library
ii  libnet1                       1.1.4-2    library for the construction and h
ii  libpcap0.8                    1.0.0-6    system interface for user-level pa
ii  libstdc++6                    4.4.2-9    The GNU Standard C++ Library v3

guessnet recommends no packages.

Versions of packages guessnet suggests:
pn  ifplugd                       <none>     (no description available)
pn  pppoe                         <none>     (no description available)

-- no debconf information
diff -ru guessnet-0.52.orig/src/options.cc guessnet-0.52/src/options.cc
--- guessnet-0.52.orig/src/options.cc	2010-02-28 06:59:46.000000000 -0700
+++ guessnet-0.52/src/options.cc	2010-03-03 21:10:51.659504541 -0700
@@ -124,6 +124,12 @@
 	if (opts.parse(argc, (const char**)argv))
 		exit(0);
 
+	// Find out the interface to be tested
+	if (opts.hasNext())
+		iface = opts.next();
+	else
+		iface = "eth0";
+
 	// Check user id
 	/*
 	if (geteuid() != 0)
@@ -162,12 +168,6 @@
 	util::Output::get().debug(opts.debug->boolValue());
 	util::Output::get().syslog(opts.syslog->boolValue());
 
-	// Find out the interface to be tested
-	if (opts.hasNext())
-		iface = opts.next();
-	else
-		iface = "eth0";
-
 	// Find out the configuration file to use
 	if (opts.hasNext())
 		config_file = opts.next();

Reply via email to