1st patch: last moment fix 2nd patch: preparation for today's release (if not today, change the date in the CHANGES file)
Vitezslav Samel (2): make more room for MAC addrs (take 2) CHANGES: prepare for release
CHANGES | 11 +++++++++++ src/othptab.c | 4 ++-- src/tcptable.c | 8 ++++---- src/tcptable.h | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-)
Make more room for textual representation of MAC addresses.
Signed-off-by: Vitezslav Samel vitezslav@samel.cz --- src/othptab.c | 4 ++-- src/tcptable.c | 8 ++++---- src/tcptable.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/othptab.c b/src/othptab.c index c73eb39..d12cdfd 100644 --- a/src/othptab.c +++ b/src/othptab.c @@ -368,7 +368,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry,
struct in_addr uninitialized_var(saddr);
- char rarp_mac_addr[15]; + char rarp_mac_addr[18];
unsigned int unknown = 0;
@@ -416,7 +416,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry, break; case ETH_P_RARP: sprintf(msgstring, "RARP "); - memset(rarp_mac_addr, 0, 15); + memset(rarp_mac_addr, 0, sizeof(rarp_mac_addr)); switch (ntohs(entry->un.rarp.opcode)) { case ARPOP_RREQUEST: strcat(msgstring, "request for "); diff --git a/src/tcptable.c b/src/tcptable.c index e6df461..56c4780 100644 --- a/src/tcptable.c +++ b/src/tcptable.c @@ -336,8 +336,8 @@ struct tcptableent *addentry(struct tcptable *table, unsigned long int saddr, * Zero out MAC address fields */
- memset(new_entry->smacaddr, 0, 15); - memset(new_entry->oth_connection->smacaddr, 0, 15); + memset(new_entry->smacaddr, 0, sizeof(new_entry->smacaddr)); + memset(new_entry->oth_connection->smacaddr, 0, sizeof(new_entry->oth_connection->smacaddr));
/* * Set raw port numbers @@ -590,7 +590,7 @@ void updateentry(struct tcptable *table, struct tcptableent *tableentry, struct OPTIONS *opts, FILE * logfile) { char msgstring[MSGSTRING_MAX]; - char newmacaddr[15]; + char newmacaddr[18];
if (tableentry->s_fstat != RESOLVED) { tableentry->s_fstat = @@ -612,7 +612,7 @@ void updateentry(struct tcptable *table, struct tcptableent *tableentry, tableentry->spanbr += bcount;
if (opts->mac) { - memset(newmacaddr, 0, 15); + memset(newmacaddr, 0, sizeof(newmacaddr));
if (linkproto == ARPHRD_ETHER) { convmacaddr((char *) (((struct ethhdr *) packet)-> diff --git a/src/tcptable.h b/src/tcptable.h index ee01417..7b2a83d 100644 --- a/src/tcptable.h +++ b/src/tcptable.h @@ -30,7 +30,7 @@ struct tcptableent { int d_fstat; unsigned int sport; unsigned int dport; - char smacaddr[15]; + char smacaddr[18]; char s_sname[11]; /* Service names, maxlen=10 */ char d_sname[11]; unsigned int protocol;
Signed-off-by: Vitezslav Samel vitezslav@samel.cz --- CHANGES | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/CHANGES b/CHANGES index eb58676..3b36ef8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,16 @@ CHANGES file for iptraf-ng
+* Wed May 23 2012 Nikola Pajkovsky npajkovs@redhat.com - 1.1.3 +- new building system (based only on make, no automake/autoconf) +- code cleanups +- SIT tunnels support +- space for HW addresses fix +- sort interfaces by ifindex +- print rates every second using moving average (over last 5 seconds) +- packet_get() bugfix (don't count packets when there's no packet ready) +- fix segfault in the tui/* code +- fix checksumming for odd-sized IPv4 header + * Fri May 04 2012 Nikola Pajkovsky npajkovs@redhat.com - 1.1.2 - massive code cleanup - fix PPP handling
Vitezslav Samel vitezslav@samel.cz writes:
1st patch: last moment fix 2nd patch: preparation for today's release (if not today, change the date in the CHANGES file)
Vitezslav Samel (2): make more room for MAC addrs (take 2) CHANGES: prepare for release
CHANGES | 11 +++++++++++ src/othptab.c | 4 ++-- src/tcptable.c | 8 ++++---- src/tcptable.h | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-)
applied.
iptraf-ng@lists.fedorahosted.org