From c8e25cfa429c66c7ecd7a310bc162430836176c0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 4 Mar 2013 11:43:49 +0100 Subject: update to latest upstream --- package/iptraf/Makefile | 4 +- package/iptraf/patches/patch-src_Makefile | 13 +++++- package/iptraf/patches/patch-src_hostmon_c | 51 +++++++++++++--------- package/iptraf/patches/patch-src_ifstats_c | 6 +-- package/iptraf/patches/patch-src_othptab_c | 47 ++++++++------------ package/iptraf/patches/patch-src_packet_c | 60 +++++++++++++------------- package/iptraf/patches/patch-src_revname_c | 6 +-- package/iptraf/patches/patch-src_tcptable_c | 12 +++--- package/iptraf/patches/patch-src_tcptable_h | 33 ++++---------- package/iptraf/patches/patch-src_tr_c | 9 ++-- package/iptraf/patches/patch-support_listbox_c | 6 +-- 11 files changed, 119 insertions(+), 128 deletions(-) (limited to 'package/iptraf') diff --git a/package/iptraf/Makefile b/package/iptraf/Makefile index 9c167c60b..0d6bc1cef 100644 --- a/package/iptraf/Makefile +++ b/package/iptraf/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= iptraf -PKG_VERSION:= 3.0.0 +PKG_VERSION:= 3.0.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= 377371c28ee3c21a76f7024920649ea8 +PKG_MD5SUM:= 004c2c005a1b78739e22bc49d33e244d PKG_DESCR:= A console-based network monitoring program. PKG_SECTION:= net PKG_DEPENDS:= libncurses diff --git a/package/iptraf/patches/patch-src_Makefile b/package/iptraf/patches/patch-src_Makefile index c73f68411..15af62737 100644 --- a/package/iptraf/patches/patch-src_Makefile +++ b/package/iptraf/patches/patch-src_Makefile @@ -1,6 +1,6 @@ $Id$ ---- iptraf-3.0.0.orig/src/Makefile 2005-09-13 11:11:17.000000000 +0200 -+++ iptraf-3.0.0/src/Makefile 2011-01-21 13:46:03.628658655 +0100 +--- iptraf-3.0.1.orig/src/Makefile 2005-09-13 11:11:17.000000000 +0200 ++++ iptraf-3.0.1/src/Makefile 2013-03-04 11:42:11.000000000 +0100 @@ -18,7 +18,8 @@ VERSION = -DVERSION=\"$(VERNUMBER)\" BINDIR = ../../iptraf-$(VERNUMBER).bin.$(ARCH) @@ -32,6 +32,15 @@ $Id$ # You can uncomment this one to disable the backspace key in input fields. # This means you must use the Del key or Ctrl+H combination to erase the +@@ -98,7 +101,7 @@ LOCKDIR = /var/run/iptraf + # Object file names + + OBJS = iptraf.o itrafmon.o packet.o tcptable.o othptab.o ifstats.o deskman.o \ +-ipcsum.o hostmon.o fltedit.o tr.o cidr.o \ ++ipcsum.o hostmon.o fltedit.o cidr.o \ + fltselect.o ipfilter.o fltmgr.o ipfrag.o serv.o servname.o instances.o \ + timer.o revname.o pktsize.o landesc.o isdntab.o options.o promisc.o ifaces.o \ + error.o log.o mode.o getpath.o bar.o parseproto.o @@ -106,33 +109,31 @@ error.o log.o mode.o getpath.o bar.o par BINS = iptraf rvnamed rawtime diff --git a/package/iptraf/patches/patch-src_hostmon_c b/package/iptraf/patches/patch-src_hostmon_c index 0c77aad22..da8d6ff69 100644 --- a/package/iptraf/patches/patch-src_hostmon_c +++ b/package/iptraf/patches/patch-src_hostmon_c @@ -1,15 +1,14 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/hostmon.c 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/hostmon.c 2008-10-09 17:34:11.000000000 +0200 -@@ -30,7 +30,6 @@ details. - #include - #include +--- iptraf-3.0.1.orig/src/hostmon.c 2007-09-25 11:18:56.000000000 +0200 ++++ iptraf-3.0.1/src/hostmon.c 2013-03-04 11:41:08.000000000 +0100 +@@ -32,7 +32,6 @@ details. #include --#include - #include + #include + #include +-#include #include #include -@@ -293,8 +292,6 @@ void printethent(struct ethtab *table, s + #include +@@ -294,8 +293,6 @@ void printethent(struct ethtab *table, s wprintw(table->tabwin, "Ethernet"); else if (entry->un.desc.linktype == LINK_PLIP) wprintw(table->tabwin, "PLIP"); @@ -18,16 +17,15 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ wprintw(table->tabwin, " HW addr: %s", entry->un.desc.ascaddr); -@@ -722,7 +719,7 @@ void hostmon(const struct OPTIONS *optio +@@ -723,7 +720,6 @@ void hostmon(const struct OPTIONS *optio unsigned long long updtime_usec = 0; struct desclist elist; /* Ethernet description list */ - struct desclist flist; /* FDDI description list */ -+ struct desclist flist; /* Other links description list */ struct desclist *list = NULL; FILE *logfile = NULL; -@@ -786,7 +783,6 @@ void hostmon(const struct OPTIONS *optio +@@ -787,7 +783,6 @@ void hostmon(const struct OPTIONS *optio initethtab(&table, options->actmode); loaddesclist(&elist, LINK_ETHERNET, WITHETCETHERS); @@ -35,18 +33,17 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ if (logging) { if (strcmp(current_logfile, "") == 0) { -@@ -900,9 +896,7 @@ void hostmon(const struct OPTIONS *optio +@@ -901,8 +896,7 @@ void hostmon(const struct OPTIONS *optio if (pkt_result != PACKET_OK) continue; - if ((linktype == LINK_ETHERNET) || (linktype == LINK_FDDI) - || (linktype == LINK_PLIP) || (linktype == LINK_TR) || -- (linktype == LINK_VLAN)) { -+ if ((linktype == LINK_ETHERNET) || (linktype == LINK_PLIP) || (linktype == LINK_TR) || (linktype == LINK_VLAN)) { ++ if ((linktype == LINK_ETHERNET) || (linktype == LINK_PLIP) || + (linktype == LINK_VLAN)) { if (fromaddr.sll_protocol == htons(ETH_P_IP)) - is_ip = 1; -@@ -920,12 +914,6 @@ void hostmon(const struct OPTIONS *optio +@@ -921,18 +915,6 @@ void hostmon(const struct OPTIONS *optio memcpy(scratch_daddr, ((struct ethhdr *) buf)->h_dest, ETH_ALEN); list = &elist; @@ -56,6 +53,20 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ - memcpy(scratch_daddr, ((struct fddihdr *) buf)->daddr, - FDDI_K_ALEN); - list = &flist; - } else if (linktype == LINK_TR) { - memcpy(scratch_saddr, ((struct trh_hdr *) buf)->saddr, - TR_ALEN); +- } else if (linktype == LINK_TR) { +- memcpy(scratch_saddr, ((struct trh_hdr *) buf)->saddr, +- TR_ALEN); +- memcpy(scratch_daddr, ((struct trh_hdr *) buf)->daddr, +- TR_ALEN); +- list = &flist; + } + + entry = in_ethtable(&table, linktype, scratch_saddr); +@@ -999,7 +981,6 @@ void hostmon(const struct OPTIONS *optio + doupdate(); + destroyethtab(&table); + destroydesclist(&elist); +- destroydesclist(&flist); + unmark_facility(LANMONIDFILE, ifptr); + strcpy(current_logfile, ""); + } diff --git a/package/iptraf/patches/patch-src_ifstats_c b/package/iptraf/patches/patch-src_ifstats_c index 555c93075..ac8f39d61 100644 --- a/package/iptraf/patches/patch-src_ifstats_c +++ b/package/iptraf/patches/patch-src_ifstats_c @@ -1,6 +1,6 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/ifstats.c 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/ifstats.c 2009-05-21 23:05:17.000000000 +0200 +--- iptraf-3.0.1.orig/src/ifstats.c 2005-09-13 08:42:54.000000000 +0200 ++++ iptraf-3.0.1/src/ifstats.c 2013-03-04 11:35:39.000000000 +0100 @@ -167,7 +167,7 @@ void initiflist(struct iflist **list) */ @@ -19,7 +19,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ (*ptmp)->index = plast->index + 1; plast->next_entry = *ptmp; (*ptmp)->prev_entry = plast; -@@ -879,7 +879,7 @@ void detstats(char *iface, const struct +@@ -879,7 +879,7 @@ void detstats(char *iface, const struct update_panels(); doupdate(); diff --git a/package/iptraf/patches/patch-src_othptab_c b/package/iptraf/patches/patch-src_othptab_c index e6b0a9829..3264a6c20 100644 --- a/package/iptraf/patches/patch-src_othptab_c +++ b/package/iptraf/patches/patch-src_othptab_c @@ -1,32 +1,14 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/othptab.c 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/othptab.c 2009-05-21 23:02:50.000000000 +0200 -@@ -17,13 +17,12 @@ details. - ***/ - +--- iptraf-3.0.1.orig/src/othptab.c 2007-09-25 11:47:35.000000000 +0200 ++++ iptraf-3.0.1/src/othptab.c 2013-03-04 11:39:50.000000000 +0100 +@@ -20,7 +20,6 @@ details. #include -+#include "options.h" -+#include "tcptable.h" + #include #include - #include --#include +-#include + #include + #include #include - #include "arphdr.h" --#include "options.h" --#include "tcptable.h" - #include "othptab.h" - #include "deskman.h" - #include "attrs.h" -@@ -128,7 +127,7 @@ struct othptabent *add_othp_entry(struct - *nomem = 1; - return NULL; - } -- bzero(new_entry, sizeof(struct othptabent)); -+ memset(new_entry, 0, sizeof(struct othptabent)); - - new_entry->is_ip = is_ip; - new_entry->fragment = fragment; -@@ -139,11 +138,6 @@ struct othptabent *add_othp_entry(struct +@@ -142,16 +141,6 @@ struct othptabent *add_othp_entry(struct new_entry->smacaddr); convmacaddr(((struct ethhdr *) packet)->h_dest, new_entry->dmacaddr); @@ -35,10 +17,15 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ - new_entry->smacaddr); - convmacaddr(((struct fddihdr *) packet)->daddr, - new_entry->dmacaddr); - } else if (linkproto == LINK_TR) { - convmacaddr(((struct trh_hdr *) packet)->saddr, - new_entry->smacaddr); -@@ -373,8 +367,7 @@ void printothpentry(struct othptable *ta +- } else if (linkproto == LINK_TR) { +- convmacaddr(((struct trh_hdr *) packet)->saddr, +- new_entry->smacaddr); +- convmacaddr(((struct trh_hdr *) packet)->daddr, +- new_entry->dmacaddr); + } + } + +@@ -376,8 +365,7 @@ void printothpentry(struct othptable *ta strcat(msgstring, scratchpad); if ((entry->linkproto == LINK_ETHERNET) || diff --git a/package/iptraf/patches/patch-src_packet_c b/package/iptraf/patches/patch-src_packet_c index 1bc9b5964..85c402678 100644 --- a/package/iptraf/patches/patch-src_packet_c +++ b/package/iptraf/patches/patch-src_packet_c @@ -1,24 +1,14 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/packet.c 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/packet.c 2009-05-21 23:03:57.000000000 +0200 -@@ -35,7 +35,6 @@ details. - #include - #include +--- iptraf-3.0.1.orig/src/packet.c 2007-09-25 11:21:18.000000000 +0200 ++++ iptraf-3.0.1/src/packet.c 2013-03-04 11:42:52.000000000 +0100 +@@ -36,7 +36,6 @@ details. #include --#include - #include + #include + #include +-#include #include #include -@@ -81,8 +80,6 @@ unsigned short getlinktype(unsigned shor - result = LINK_ETHERNET; - else if (strncmp(ifname, "plip", 4) == 0) - result = LINK_PLIP; -- else if (strncmp(ifname, "fddi", 4) == 0) /* For some Ethernet- */ -- result = LINK_ETHERNET; /* emulated FDDI ifaces */ - else if (strncmp(ifname, "dvb", 3) == 0) - result = LINK_ETHERNET; - else if (strncmp(ifname, "sbni", 4) == 0) -@@ -136,9 +133,6 @@ unsigned short getlinktype(unsigned shor + #include +@@ -136,9 +135,6 @@ unsigned short getlinktype(unsigned shor case ARPHRD_PPP: result = LINK_PPP; break; @@ -28,7 +18,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ case ARPHRD_IEEE802: case ARPHRD_IEEE802_TR: result = LINK_TR; -@@ -194,19 +188,6 @@ void adjustpacket(char *tpacket, unsigne +@@ -194,36 +190,6 @@ void adjustpacket(char *tpacket, unsigne *packet = tpacket + 4; *readlen -= 4; break; @@ -45,15 +35,23 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ - memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen)); - *packet = aligned_buf; - break; - case LINK_TR: - /* - * Token Ring patch supplied by Tomas Dvorak -@@ -337,7 +318,7 @@ int processpacket(char *tpacket, char ** - * Prepare ISDN reference descriptor and table. - */ - -- bzero(&isdntable, sizeof(struct isdntab)); -+ memset(&isdntable, 0, sizeof(struct isdntab)); - isdn_iface_check(&isdnfd, ifname); - - /* +- case LINK_TR: +- /* +- * Token Ring patch supplied by Tomas Dvorak +- */ +- +- /* +- * Get the start of the IP packet from the Token Ring frame. +- */ +- dataoffset = get_tr_ip_offset(tpacket); +- *packet = tpacket + dataoffset; +- *readlen -= dataoffset; +- /* +- * Move IP datagram into an aligned buffer. +- */ +- memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen)); +- *packet = aligned_buf; +- break; + case LINK_IPIP: + *packet = tpacket; + break; diff --git a/package/iptraf/patches/patch-src_revname_c b/package/iptraf/patches/patch-src_revname_c index 97aae6f8c..d6b4d4d5c 100644 --- a/package/iptraf/patches/patch-src_revname_c +++ b/package/iptraf/patches/patch-src_revname_c @@ -1,7 +1,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/revname.c 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/revname.c 2009-05-21 23:03:07.000000000 +0200 -@@ -164,7 +164,7 @@ int revname(int *lookup, struct in_addr +--- iptraf-3.0.1.orig/src/revname.c 2005-09-13 08:42:54.000000000 +0200 ++++ iptraf-3.0.1/src/revname.c 2013-03-04 11:35:39.000000000 +0100 +@@ -164,7 +164,7 @@ int revname(int *lookup, struct in_addr struct timeval tv; int sstat = 0; diff --git a/package/iptraf/patches/patch-src_tcptable_c b/package/iptraf/patches/patch-src_tcptable_c index 6ac96e6d1..80b74ba4f 100644 --- a/package/iptraf/patches/patch-src_tcptable_c +++ b/package/iptraf/patches/patch-src_tcptable_c @@ -1,6 +1,6 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/tcptable.c 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/tcptable.c 2009-05-21 23:07:02.000000000 +0200 +--- iptraf-3.0.1.orig/src/tcptable.c 2005-09-13 08:42:54.000000000 +0200 ++++ iptraf-3.0.1/src/tcptable.c 2013-03-04 11:38:22.000000000 +0100 @@ -17,6 +17,7 @@ details. ***/ @@ -29,7 +29,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ /* * Set raw port numbers -@@ -596,12 +597,10 @@ void updateentry(struct tcptable *table, +@@ -596,14 +597,10 @@ void updateentry(struct tcptable *table, tableentry->spanbr += bcount; if (opts->mac) { @@ -40,6 +40,8 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ convmacaddr(((struct ethhdr *) packet)->h_source, newmacaddr); - } else if (linkproto == LINK_FDDI) { - convmacaddr(((struct fddihdr *) packet)->saddr, newmacaddr); - } else if (linkproto == LINK_TR) { - convmacaddr(((struct trh_hdr *) packet)->saddr, newmacaddr); +- } else if (linkproto == LINK_TR) { +- convmacaddr(((struct trh_hdr *) packet)->saddr, newmacaddr); } + + if (tableentry->smacaddr[0] != '\0') { diff --git a/package/iptraf/patches/patch-src_tcptable_h b/package/iptraf/patches/patch-src_tcptable_h index a20d69969..f2a0d15c6 100644 --- a/package/iptraf/patches/patch-src_tcptable_h +++ b/package/iptraf/patches/patch-src_tcptable_h @@ -1,27 +1,10 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/tcptable.h 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/tcptable.h 2009-05-21 22:49:05.000000000 +0200 -@@ -6,7 +6,6 @@ - - ***/ - --#include - #include - #include - #include -@@ -14,15 +13,12 @@ - #include - #include - #include --#include - #include - #include - #include - #include --#include - #include +--- iptraf-3.0.1.orig/src/tcptable.h 2007-09-25 11:46:03.000000000 +0200 ++++ iptraf-3.0.1/src/tcptable.h 2013-03-04 11:35:47.000000000 +0100 +@@ -24,7 +24,6 @@ #include --#include - #include - #include + #include + #include +-#include + // #include #include + #include diff --git a/package/iptraf/patches/patch-src_tr_c b/package/iptraf/patches/patch-src_tr_c index 391c26e6c..09c6b544d 100644 --- a/package/iptraf/patches/patch-src_tr_c +++ b/package/iptraf/patches/patch-src_tr_c @@ -1,12 +1,13 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/src/tr.c 2005-09-13 08:42:54.000000000 +0200 -+++ iptraf-3.0.0/src/tr.c 2009-05-21 22:59:57.000000000 +0200 -@@ -6,7 +6,7 @@ +--- iptraf-3.0.1.orig/src/tr.c 2005-09-13 08:42:54.000000000 +0200 ++++ iptraf-3.0.1/src/tr.c 2013-03-04 11:41:40.000000000 +0100 +@@ -6,8 +6,7 @@ * Copyright (c) Gerard Paul Java 2002 */ -#include +-#include +#include - #include #include + unsigned int get_tr_ip_offset(unsigned char *pkt) diff --git a/package/iptraf/patches/patch-support_listbox_c b/package/iptraf/patches/patch-support_listbox_c index df5521b7f..0d760507a 100644 --- a/package/iptraf/patches/patch-support_listbox_c +++ b/package/iptraf/patches/patch-support_listbox_c @@ -1,7 +1,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- iptraf-3.0.0.orig/support/listbox.c 2002-07-19 18:48:11.000000000 +0200 -+++ iptraf-3.0.0/support/listbox.c 2009-05-21 23:06:00.000000000 +0200 -@@ -19,7 +19,7 @@ void tx_init_listbox(struct scroll_list +--- iptraf-3.0.1.orig/support/listbox.c 2002-07-19 18:48:11.000000000 +0200 ++++ iptraf-3.0.1/support/listbox.c 2013-03-04 11:35:39.000000000 +0100 +@@ -19,7 +19,7 @@ void tx_init_listbox(struct scroll_list int mainattr, int borderattr, int selectattr, int keyattr) { -- cgit v1.2.3