diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-06 08:09:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-06 08:09:55 +0000 |
commit | 10c8d7593a320a8b57226a1571541fb5d2ed033f (patch) | |
tree | 330b6f5d21273b5865cada979363407726eadd3a | |
parent | 494ef815d1464d5187978abd7b6e598886d249c8 (diff) | |
download | aports-10c8d7593a320a8b57226a1571541fb5d2ed033f.tar.bz2 aports-10c8d7593a320a8b57226a1571541fb5d2ed033f.tar.xz |
main/iptraf: add patch that enables bond interfaces
fixes #236
-rw-r--r-- | main/iptraf/APKBUILD | 9 | ||||
-rw-r--r-- | main/iptraf/iptraf-3.0.0-interface.patch | 68 |
2 files changed, 74 insertions, 3 deletions
diff --git a/main/iptraf/APKBUILD b/main/iptraf/APKBUILD index d4e4b23396..e8f0c496e0 100644 --- a/main/iptraf/APKBUILD +++ b/main/iptraf/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Leonardo Arena <rnalrd@gmail.com> pkgname=iptraf pkgver=3.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="IP Network Monitoring Software" url="http://iptraf.seoul.org" license="GPL" @@ -11,7 +11,9 @@ makedepends="ncurses-dev" install= subpackages="$pkgname-doc" source="ftp://iptraf.seul.org/pub/$pkgname/$pkgname-$pkgver.tar.gz - iptraf-3.0.0-vlan.patch" + iptraf-3.0.0-vlan.patch + iptraf-3.0.0-interface.patch + " build() { cd "$srcdir/$pkgname-$pkgver/src" @@ -37,4 +39,5 @@ build() { } md5sums="377371c28ee3c21a76f7024920649ea8 iptraf-3.0.0.tar.gz -4136483b9e41c8789c629c42f9a67d07 iptraf-3.0.0-vlan.patch" +4136483b9e41c8789c629c42f9a67d07 iptraf-3.0.0-vlan.patch +667def7e433fe95823fec8faeb3cd8b9 iptraf-3.0.0-interface.patch" diff --git a/main/iptraf/iptraf-3.0.0-interface.patch b/main/iptraf/iptraf-3.0.0-interface.patch new file mode 100644 index 0000000000..d64c963813 --- /dev/null +++ b/main/iptraf/iptraf-3.0.0-interface.patch @@ -0,0 +1,68 @@ +--- 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) |