summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2008-10-24 15:23:57 +0000
committerPeter Volkov <pva@gentoo.org>2008-10-24 15:23:57 +0000
commit74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225 (patch)
treed87ca8e2122ca64059c88ce3490f26f003209523 /net-analyzer/iptraf/files
parentAdded suid bin on fping binary, required by many monitoring tools (nagious, z... (diff)
downloadgentoo-2-74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225.tar.gz
gentoo-2-74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225.tar.bz2
gentoo-2-74dd0d9f4e8c5ac24e1ca0c36da7f5259b899225.zip
Fixes ability to listen on vlan interfaces, bug #231745, thank Tomas Vasek for report and Ross Dougherty for actual tests. Removed old.
(Portage version: 2.2_rc12/cvs/Linux 2.6.26-openvz.git-777e816 i686)
Diffstat (limited to 'net-analyzer/iptraf/files')
-rw-r--r--net-analyzer/iptraf/files/iptraf-3.0.0-vlan.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/net-analyzer/iptraf/files/iptraf-3.0.0-vlan.patch b/net-analyzer/iptraf/files/iptraf-3.0.0-vlan.patch
new file mode 100644
index 000000000000..f0087bf39478
--- /dev/null
+++ b/net-analyzer/iptraf/files/iptraf-3.0.0-vlan.patch
@@ -0,0 +1,28 @@
+--- 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 */