rpms/iptraf/devel iptraf-3.0.0-interface.patch,NONE,1.1
Zdenek Prikryl (zprikryl)
fedora-extras-commits at redhat.com
Thu Jun 5 13:40:34 UTC 2008
- Previous message (by thread): rpms/pam_passwdqc/devel pam_passwdqc-1.0.5.tar.gz.sign, NONE, 1.1 .cvsignore, 1.5, 1.6 pam_passwdqc.spec, 1.13, 1.14 sources, 1.6, 1.7
- Next message (by thread): rpms/iptraf/devel iptraf-3.0.0-ipv6.patch, NONE, 1.1 iptraf-3.0.1-ipv6-fix.patch, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: zprikryl
Update of /cvs/extras/rpms/iptraf/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3572/devel
Added Files:
iptraf-3.0.0-interface.patch
Log Message:
Fixed vlan support (#219772)
Added support for bond interfaces
iptraf-3.0.0-interface.patch:
--- NEW FILE iptraf-3.0.0-interface.patch ---
--- iptraf-3.0.0/src/packet.c.interface 2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0/src/packet.c 2008-04-22 15:27:30.000000000 +0200
@@ -102,11 +102,19 @@ unsigned short getlinktype(unsigned shor
else if (strncmp(ifname, "tun", 3) == 0)
result = LINK_ETHERNET;
else if (strncmp(ifname, "vlan", 3) == 0)
- result = LINK_VLAN;
+ result = LINK_ETHERNET;
+ else if (strncmp(ifname, "bond", 4) == 0)
+ result = LINK_ETHERNET;
else if (strncmp(ifname, "brg", 3) == 0)
result = LINK_ETHERNET;
else if (strncmp(ifname, "tap", 3) == 0)
result = LINK_ETHERNET;
+ else if (strncmp(ifname, "ctc", 3) == 0)
+ result = LINK_ETHERNET;
+ else if (strncmp(ifname, "hsi", 3) == 0)
+ result = LINK_ETHERNET;
+ else if (strncmp(ifname, "ath", 3) == 0)
+ result = LINK_ETHERNET;
else if ((strncmp(ifname, "isdn", 4) == 0) && (isdn_fd != -1)) {
isdnent = isdn_table_lookup(isdnlist, ifname, isdn_fd);
@@ -235,6 +243,7 @@ void adjustpacket(char *tpacket, unsigne
*/
memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
*packet = aligned_buf;
+ break;
default:
*packet = (char *) NULL; /* return a NULL packet to signal */
break; /* an unrecognized link protocol */
@@ -344,9 +353,14 @@ int processpacket(char *tpacket, char **
* Get IPTraf link type based on returned information and move past
* data link header.
*/
- *linktype =
- getlinktype(fromaddr->sll_hatype, ifname, isdnfd, &isdntable);
fromaddr->sll_protocol = ntohs(fromaddr->sll_protocol);
+ if (fromaddr->sll_protocol != ETH_P_8021Q)
+ *linktype =
+ getlinktype(fromaddr->sll_hatype, ifname, isdnfd, &isdntable);
+ else {
+ *linktype = LINK_VLAN;
+ fromaddr->sll_protocol = ntohs(*((unsigned short*)(tpacket+ETH_HLEN+2)));
+ }
adjustpacket(tpacket, *linktype, packet, aligned_buf, br);
if (*packet == NULL)
--- iptraf-3.0.0/src/ifaces.c.interface 2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0/src/ifaces.c 2008-04-22 15:35:40.000000000 +0200
@@ -32,14 +32,15 @@ details.
#include "error.h"
extern int accept_unsupported_interfaces;
-#define NUM_SUPPORTED_IFACES 26
+#define NUM_SUPPORTED_IFACES 30
extern int daemonized;
char ifaces[][6] =
{ "lo", "eth", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb",
"pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3",
- "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan"
+ "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan", "hsi",
+ "ctc", "ath", "bond"
};
char *ltrim(char *buf)
- Previous message (by thread): rpms/pam_passwdqc/devel pam_passwdqc-1.0.5.tar.gz.sign, NONE, 1.1 .cvsignore, 1.5, 1.6 pam_passwdqc.spec, 1.13, 1.14 sources, 1.6, 1.7
- Next message (by thread): rpms/iptraf/devel iptraf-3.0.0-ipv6.patch, NONE, 1.1 iptraf-3.0.1-ipv6-fix.patch, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list