Package: iptraf
Version: 3.0.0-6
Followup-For: Bug #415616

It still doesn't work in iptraf 3.0.0-6 in Lenny. If you read original
report, author *does* see the listed vlan* interfaces, but when he chooses
them, the iptraf behaves like there is absolutely no traffic at all at that
interface.

I have the same problem - iptraf lists all my interfaces like "vlan10",
"vlan20" etc, but does not show any traffic on them. If I pick "bond0" (from
which those vlan interfaces are created) I can see the traffic normally, as
I can if I choose "eth0" or "eth1" (from which bond0 is created).

running "iptraf -u -i vlan10" does not help anything, symptoms are the same
as running normally - no traffic show from vlan10. 

(note that of course the interface "vlan10" has a lot of traffic, which I
can easily verify with "tcpdump -npi vlan10" or similar).

The patch which fixes the problem is provided at
http://linux.mantech.ro/IPTraf-fix.html and attached here.

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages iptraf depends on:
ii  libc6                     2.7-18         GNU C Library: Shared libraries
ii  libncurses5               5.7+20081213-1 shared libraries for terminal hand

iptraf recommends no packages.

iptraf suggests no packages.

-- no debconf information
--- src/packet.c.orig	2008-03-07 17:56:48.000000000 +0200
+++ src/packet.c	2008-03-07 18:05:41.000000000 +0200
@@ -101,8 +101,8 @@
             result = LINK_ETHERNET;
         else if (strncmp(ifname, "tun", 3) == 0)
             result = LINK_ETHERNET;
-        else if (strncmp(ifname, "vlan", 3) == 0)
-            result = LINK_VLAN;
+        else if (strncmp(ifname, "vlan", 4) == 0)
+            result = LINK_ETHERNET;
         else if (strncmp(ifname, "brg", 3) == 0)
             result = LINK_ETHERNET;
         else if (strncmp(ifname, "tap", 3) == 0)
@@ -231,14 +231,6 @@
     case LINK_IPIP:
         *packet = tpacket;
         break;
-    case LINK_VLAN:
-        *packet = tpacket + VLAN_ETH_HLEN;
-        readlen -= VLAN_ETH_HLEN;
-        /*
-         * Move IP datagram into an aligned buffer.
-         */
-        memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
-        *packet = aligned_buf;
     default:
         *packet = (char *) NULL;        /* return a NULL packet to signal */
         break;                  /* an unrecognized link protocol */

Reply via email to