Hello community, here is the log from the commit of package nfdump for openSUSE:Leap:15.2 checked in at 2020-04-02 16:49:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/nfdump (Old) and /work/SRC/openSUSE:Leap:15.2/.nfdump.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nfdump" Thu Apr 2 16:49:24 2020 rev:2 rq:790660 version:1.6.20 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/nfdump/nfdump.changes 2020-02-29 17:18:48.541334902 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.nfdump.new.3248/nfdump.changes 2020-04-02 16:49:25.238032745 +0200 @@ -1,0 +2,8 @@ +Sun Mar 29 10:33:10 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Update to version 1.6.20 + - More cleanup on plain number printing + - Fix plain numbers bug #213 + - Fix profiler filer bug + +------------------------------------------------------------------- Old: ---- nfdump-1.6.19.tar.gz New: ---- nfdump-1.6.20.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nfdump.spec ++++++ --- /var/tmp/diff_new_pack.ONy9NY/_old 2020-04-02 16:49:25.598033173 +0200 +++ /var/tmp/diff_new_pack.ONy9NY/_new 2020-04-02 16:49:25.602033178 +0200 @@ -1,7 +1,7 @@ # -# spec file for package +# spec file for package nfdump # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,14 +12,15 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %define nfcapddatadir %{_localstatedir}/lib/nfcapd %define sfcapddatadir %{_localstatedir}/lib/sfcapd %define nfhomedir %{_var}/lib/%{name} Name: nfdump -Version: 1.6.19 +Version: 1.6.20 Release: 0 Summary: CLI tools to collect and process netflow data License: BSD-3-Clause ++++++ nfdump-1.6.19.tar.gz -> nfdump-1.6.20.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/ChangeLog new/nfdump-1.6.20/ChangeLog --- old/nfdump-1.6.19/ChangeLog 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/ChangeLog 2020-03-29 12:00:43.000000000 +0200 @@ -1,3 +1,11 @@ +2020-03-29 +- Release 1.6.20 +- More cleanup on plain number printing + +2020-03-28 +- Fix plain numbers bug #213 +- Fix profiler filer bug + 2020-02-22 - Release 1.6.19 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/README.md new/nfdump-1.6.20/README.md --- old/nfdump-1.6.19/README.md 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/README.md 2020-03-29 12:00:43.000000000 +0200 @@ -1,8 +1,8 @@ # nfdump -Stable Release v1.6.19 +Stable Release v1.6.20 -See the Changelog file for all changes in release 1.6.19 +See the Changelog file for all changes in release 1.6.20 nfdump is a toolset in order to collect and process netflow and sflow data, sent from netflow/sflow compatible devices. The toolset supports netflow __v1__, __v5/v7__,__v9__,__IPFIX__ and __SFLOW__. nfdump supports IPv4 as well as IPv6. @@ -31,7 +31,7 @@ does not support the full IPFIX definition. * Supports basically same feature set of elements as netflow_v9 module -* Only UDP traffic is accepted no tCP/SCTP +* Only UDP traffic is accepted no TCP/SCTP * If you would like to see more IPFIX support, please contact me. --- @@ -215,7 +215,7 @@ proper IP addresses. See the manual pages or use the -h switch for details on using each of -the programs. For any questions send email to ph...@users.sourceforge.net +the programs. For any questions send email to pe...@people.ops-trust.net Configure your router to export netflow. See the relevant documentation for your model. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/Makefile.am new/nfdump-1.6.20/bin/Makefile.am --- old/nfdump-1.6.19/bin/Makefile.am 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/Makefile.am 2020-03-29 12:00:43.000000000 +0200 @@ -37,7 +37,8 @@ output += output_json.c output_json.h output_csv.c output_csv.h output_pipe.c output_pipe.h output += output_fmt.c output_fmt.h util = util.c util.h -filelzo = minilzo.c minilzo.h lzoconf.h lzodefs.h lz4.c lz4.h nffile.c nffile.h nfx.c nfx.h +filelzo = minilzo.c minilzo.h lzoconf.h lzodefs.h lz4.c lz4.h +nffile = nffile.c nffile.h nfx.c nfx.h nflist = flist.c flist.h fts_compat.c fts_compat.h filter = grammar.y scanner.l nftree.c nftree.h ipconv.c ipconv.h rbtree.h exporter = exporter.c exporter.h @@ -61,8 +62,8 @@ launch = launch.c launch.h lib_LTLIBRARIES = libnfdump.la -libnfdump_la_SOURCES = $(output) $(util) $(filelzo) $(nflist) $(filter) $(exporter) -libnfdump_la_LDFLAGS = -release 1.6.19 +libnfdump_la_SOURCES = $(output) $(util) $(filelzo) $(nffile) $(nflist) $(filter) $(exporter) +libnfdump_la_LDFLAGS = -release 1.6.20 nfdump_SOURCES = nfdump.c nfdump.h nfstat.c nfstat.h nfexport.c nfexport.h \ Binary files old/nfdump-1.6.19/bin/captured and new/nfdump-1.6.20/bin/captured differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/nfdump.c new/nfdump-1.6.20/bin/nfdump.c --- old/nfdump-1.6.19/bin/nfdump.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/nfdump.c 2020-03-29 12:00:43.000000000 +0200 @@ -242,7 +242,7 @@ /* Function Prototypes */ static void usage(char *name); -static void PrintSummary(stat_record_t *stat_record, int plain_numbers, int csv_output); +static void PrintSummary(stat_record_t *stat_record, int printPlain, int csv_output); static stat_record_t process_data(char *wfile, int element_stat, int flow_stat, int sort_flows, printer_t print_record, time_t twin_start, time_t twin_end, @@ -313,7 +313,7 @@ // empty - do not list any flows } // End of flow_record_to_null -static void PrintSummary(stat_record_t *stat_record, int plain_numbers, int csv_output) { +static void PrintSummary(stat_record_t *stat_record, int printPlain, int csv_output) { static double duration; uint64_t bps, pps, bpp; char byte_str[NUMBER_STRING_SIZE], packet_str[NUMBER_STRING_SIZE]; @@ -339,17 +339,19 @@ (long long unsigned)stat_record->numflows, (long long unsigned)stat_record->numbytes, (long long unsigned)stat_record->numpackets, (long long unsigned)bps, (long long unsigned)pps, (long long unsigned)bpp ); - } else if ( plain_numbers ) { +/* + } else if ( printPlain ) { printf("Summary: total flows: %llu, total bytes: %llu, total packets: %llu, avg bps: %llu, avg pps: %llu, avg bpp: %llu\n", (long long unsigned)stat_record->numflows, (long long unsigned)stat_record->numbytes, (long long unsigned)stat_record->numpackets, (long long unsigned)bps, (long long unsigned)pps, (long long unsigned)bpp ); +*/ } else { - format_number(stat_record->numbytes, byte_str, DO_SCALE_NUMBER, VAR_LENGTH); - format_number(stat_record->numpackets, packet_str, DO_SCALE_NUMBER, VAR_LENGTH); - format_number(bps, bps_str, DO_SCALE_NUMBER, VAR_LENGTH); - format_number(pps, pps_str, DO_SCALE_NUMBER, VAR_LENGTH); - format_number(bpp, bpp_str, DO_SCALE_NUMBER, VAR_LENGTH); + format_number(stat_record->numbytes, byte_str, printPlain, VAR_LENGTH); + format_number(stat_record->numpackets, packet_str, printPlain, VAR_LENGTH); + format_number(bps, bps_str, printPlain, VAR_LENGTH); + format_number(pps, pps_str, printPlain, VAR_LENGTH); + format_number(bpp, bpp_str, printPlain, VAR_LENGTH); printf("Summary: total flows: %llu, total bytes: %s, total packets: %s, avg bps: %s, avg pps: %s, avg bpp: %s\n", (unsigned long long)stat_record->numflows, byte_str, packet_str, bps_str, pps_str, bpp_str ); } @@ -659,7 +661,7 @@ int c, ffd, ret, element_stat, fdump; int i, quiet, flow_stat, topN, aggregate, aggregate_mask, bidir; int print_stat, syntax_only, date_sorted, do_tag, compress; -int plain_numbers, GuessDir, pipe_output, csv_output, json_output, ModifyCompress; +int printPlain, GuessDir, pipe_output, csv_output, json_output, ModifyCompress; time_t t_start, t_end; uint32_t limitRecords; char Ident[IDENTLEN]; @@ -683,7 +685,7 @@ do_tag = 0; quiet = 0; compress = NOT_COMPRESSED; - plain_numbers = 0; + printPlain = 0; pipe_output = 0; csv_output = 0; json_output = 0; @@ -805,7 +807,7 @@ byte_limit_string = optarg; break; case 'N': - plain_numbers = 1; + printPlain = 1; break; case 'f': ffile = optarg; @@ -1000,7 +1002,7 @@ // special user defined output format char *format = &print_format[4]; if ( strlen(format) ) { - if ( !ParseOutputFormat(format, plain_numbers, printmap) ) + if ( !ParseOutputFormat(format, printPlain, printmap) ) exit(255); print_record = format_special; print_prolog = text_prolog; @@ -1025,7 +1027,7 @@ while ( printmap[i].printmode ) { if ( strncasecmp(print_format, printmap[i].printmode, MAXMODELEN) == 0 ) { if ( printmap[i].Format ) { - if ( !ParseOutputFormat(printmap[i].Format, plain_numbers, printmap) ) + if ( !ParseOutputFormat(printmap[i].Format, printPlain, printmap) ) exit(255); // predefined custom format print_record = printmap[i].func_record; @@ -1167,7 +1169,7 @@ } if (element_stat) { - PrintElementStat(&sum_stat, plain_numbers, print_record, topN, do_tag, quiet, pipe_output, csv_output); + PrintElementStat(&sum_stat, printPlain, print_record, topN, do_tag, quiet, pipe_output, csv_output); } if ( print_epilog ) { @@ -1175,11 +1177,11 @@ } if ( !quiet && !json_output ) { if ( csv_output ) { - PrintSummary(&sum_stat, plain_numbers, csv_output); + PrintSummary(&sum_stat, printPlain, csv_output); } else if ( !wfile ) { if (is_anonymized) printf("IP addresses anonymised\n"); - PrintSummary(&sum_stat, plain_numbers, csv_output); + PrintSummary(&sum_stat, printPlain, csv_output); if ( t_last_flow == 0 ) { // in case of a pre 1.6.6 collected and empty flow file printf("Time window: <unknown>\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/nffile.c new/nfdump-1.6.20/bin/nffile.c --- old/nfdump-1.6.19/bin/nffile.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/nffile.c 2020-03-29 12:00:43.000000000 +0200 @@ -1053,14 +1053,6 @@ // check block compression - defaults to file compression setting compression = FILE_COMPRESSION(nffile); - // block type 1/2 does not honour the compression flag and inherites - // the file compression settings - thes block types are depricated - if ( nffile->block_header->id == DATA_BLOCK_TYPE_3 ) { - if ( !TestFlag(nffile->block_header->flags, FLAG_BLOCK_COMPRESSED ) ) - compression = NOT_COMPRESSED; - // else block compressed. - } - ret = read(nffile->fd, nffile->buff_ptr, nffile->block_header->size); if ( ret == nffile->block_header->size ) { // we have the whole record and are done for now diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/nffileV2.h new/nfdump-1.6.20/bin/nffileV2.h --- old/nfdump-1.6.19/bin/nffileV2.h 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/nffileV2.h 2020-03-29 12:00:43.000000000 +0200 @@ -90,13 +90,10 @@ */ typedef struct dataBlock_s { - uint32_t NumRecords; // number of data records in data block + uint32_t type; // Block type +#define TYPE_STAT_BLOCK 1 +#define TYPE_RECORD_BLOCK 2 uint32_t size; // size of this block in bytes without this header - uint16_t id; // Block ID == DATA_BLOCK_TYPE_3 -#define DATA_BLOCK_TYPE_3 3 - uint16_t flags; -#define FLAG_BLOCK_COMPRESSED 1 -// Bit 0 - 0: uncompressed data, 1: compressed data } dataBlock_t; /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/nfstat.c new/nfdump-1.6.20/bin/nfstat.c --- old/nfdump-1.6.19/bin/nfstat.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/nfstat.c 2020-03-29 12:00:43.000000000 +0200 @@ -457,11 +457,11 @@ static inline void PrintSortedFlowcache(SortElement_t *SortList, uint32_t maxindex, int limit_count, int GuessFlowDirection, printer_t print_record, int tag, int ascending, extension_map_list_t *extension_map_list ); -static void PrintStatLine(stat_record_t *stat, uint32_t plain_numbers, StatRecord_t *StatData, int type, int order_proto, int tag, int inout); +static void PrintStatLine(stat_record_t *stat, uint32_t printPlain, StatRecord_t *StatData, int type, int order_proto, int tag, int inout); static void PrintPipeStatLine(StatRecord_t *StatData, int type, int order_proto, int tag, int inout); -static void PrintCvsStatLine(stat_record_t *stat, StatRecord_t *StatData, int type, int order_proto, int tag, int inout); +static void PrintCvsStatLine(stat_record_t *stat, int printPlain, StatRecord_t *StatData, int type, int order_proto, int tag, int inout); static inline int TimeMsec_CMP(time_t t1, uint16_t offset1, time_t t2, uint16_t offset2 ); @@ -1121,7 +1121,7 @@ } // End of AddStat -static void PrintStatLine(stat_record_t *stat, uint32_t plain_numbers, StatRecord_t *StatData, int type, int order_proto, int tag, int inout) { +static void PrintStatLine(stat_record_t *stat, uint32_t printPlain, StatRecord_t *StatData, int type, int order_proto, int tag, int inout) { char valstr[40], datestr[64]; char flows_str[NUMBER_STRING_SIZE], byte_str[NUMBER_STRING_SIZE], packets_str[NUMBER_STRING_SIZE]; char pps_str[NUMBER_STRING_SIZE], bps_str[NUMBER_STRING_SIZE]; @@ -1130,7 +1130,6 @@ double duration, flows_percent, packets_percent, bytes_percent; uint32_t bpp; uint64_t pps, bps; -int scale; time_t first; struct tm *tbuff; @@ -1205,13 +1204,12 @@ } valstr[39] = 0; - scale = plain_numbers == 0; count_flows = StatData->counter[FLOWS]; count_packets = packets_element(StatData, inout); count_bytes = bytes_element(StatData, inout); - format_number(count_flows, flows_str, scale, FIXED_WIDTH); - format_number(count_packets, packets_str, scale, FIXED_WIDTH); - format_number(count_bytes, byte_str, scale, FIXED_WIDTH); + format_number(count_flows, flows_str, printPlain, FIXED_WIDTH); + format_number(count_packets, packets_str, printPlain, FIXED_WIDTH); + format_number(count_bytes, byte_str, printPlain, FIXED_WIDTH); flows_percent = stat->numflows ? (double)(count_flows * 100 ) / (double)stat->numflows : 0; if ( stat->numpackets ) { @@ -1242,8 +1240,8 @@ bpp = 0; } - format_number(pps, pps_str, scale, FIXED_WIDTH); - format_number(bps, bps_str, scale, FIXED_WIDTH); + format_number(pps, pps_str, printPlain, FIXED_WIDTH); + format_number(bps, bps_str, printPlain, FIXED_WIDTH); first = StatData->first; tbuff = localtime(&first); @@ -1256,13 +1254,13 @@ if ( Getv6Mode() && ( type == IS_IPADDR ) ) printf("%s.%03u %9.3f %-5s %s%39s %8s(%4.1f) %8s(%4.1f) %8s(%4.1f) %8s %8s %5u\n", datestr, StatData->msec_first, duration, - order_proto ? ProtoString(StatData->prot) : "any", tag_string, valstr, + order_proto ? ProtoString(StatData->prot, printPlain) : "any", tag_string, valstr, flows_str, flows_percent, packets_str, packets_percent, byte_str, bytes_percent, pps_str, bps_str, bpp ); else { printf("%s.%03u %9.3f %-5s %s%17s %8s(%4.1f) %8s(%4.1f) %8s(%4.1f) %8s %8s %5u\n", datestr, StatData->msec_first, duration, - order_proto ? ProtoString(StatData->prot) : "any", tag_string, valstr, + order_proto ? ProtoString(StatData->prot, printPlain) : "any", tag_string, valstr, flows_str, flows_percent, packets_str, packets_percent, byte_str, bytes_percent, pps_str, bps_str, bpp ); } @@ -1332,7 +1330,7 @@ } // End of PrintPipeStatLine -static void PrintCvsStatLine(stat_record_t *stat, StatRecord_t *StatData, int type, int order_proto, int tag, int inout) { +static void PrintCvsStatLine(stat_record_t *stat, int printPlain, StatRecord_t *StatData, int type, int order_proto, int tag, int inout) { char valstr[40], datestr1[64], datestr2[64]; uint64_t count_flows, count_packets, count_bytes; double duration, flows_percent, packets_percent, bytes_percent; @@ -1421,7 +1419,7 @@ printf("%s,%s,%.3f,%s,%s,%llu,%.1f,%llu,%.1f,%llu,%.1f,%llu,%llu,%u\n", datestr1, datestr2, duration, - order_proto ? ProtoString(StatData->prot) : "any", valstr, + order_proto ? ProtoString(StatData->prot, printPlain) : "any", valstr, (long long unsigned)count_flows, flows_percent, (long long unsigned)count_packets, packets_percent, (long long unsigned)count_bytes, bytes_percent, @@ -1749,7 +1747,7 @@ } // End of PrintSortedFlowcache -void PrintElementStat(stat_record_t *sum_stat, uint32_t limitflows, printer_t print_record, int topN, int tag, int quiet, int pipe_output, int cvs_output) { +void PrintElementStat(stat_record_t *sum_stat, uint32_t printPlain, printer_t print_record, int topN, int tag, int quiet, int pipe_output, int cvs_output) { SortElement_t *topN_element_list; uint32_t numflows; int32_t i, j, hash_num, order_index; @@ -1804,10 +1802,10 @@ PrintPipeStatLine((StatRecord_t *)topN_element_list[i].record, type, StatRequest[hash_num].order_proto, tag, order_mode[order_index].inout); else if ( cvs_output ) - PrintCvsStatLine(sum_stat, (StatRecord_t *)topN_element_list[i].record, type, + PrintCvsStatLine(sum_stat, printPlain, (StatRecord_t *)topN_element_list[i].record, type, StatRequest[hash_num].order_proto, tag, order_mode[order_index].inout); else - PrintStatLine(sum_stat, limitflows, (StatRecord_t *)topN_element_list[i].record, + PrintStatLine(sum_stat, printPlain, (StatRecord_t *)topN_element_list[i].record, type, StatRequest[hash_num].order_proto, tag, order_mode[order_index].inout); } free((void *)topN_element_list); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/nfstat.h new/nfdump-1.6.20/bin/nfstat.h --- old/nfdump-1.6.19/bin/nfstat.h 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/nfstat.h 2020-03-29 12:00:43.000000000 +0200 @@ -121,7 +121,7 @@ void PrintFlowStat(func_prolog_t record_header, printer_t print_record, int topN, int tag, int quiet, int cvs_output, extension_map_list_t *extension_map_list); -void PrintElementStat(stat_record_t *sum_stat, uint32_t limitflows, printer_t print_record, int topN, int tag, int quiet, int pipe_output, int cvs_output); +void PrintElementStat(stat_record_t *sum_stat, uint32_t printPlain, printer_t print_record, int topN, int tag, int quiet, int pipe_output, int cvs_output); int ParseListOrder(char *s, int multiple_orders ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/output_csv.c new/nfdump-1.6.20/bin/output_csv.c --- old/nfdump-1.6.19/bin/output_csv.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/output_csv.c 2020-03-29 12:00:43.000000000 +0200 @@ -123,7 +123,7 @@ _s = data_string; slen = STRINGSIZE; snprintf(_s, slen-1, "%s,%s,%.3f,%s,%s,%u,%u,%s,%s,%u,%u,%llu,%llu,%llu,%llu", - datestr1, datestr2, duration, as,ds,r->srcport, r->dstport, ProtoString(r->prot), + datestr1, datestr2, duration, as,ds,r->srcport, r->dstport, ProtoString(r->prot, 0), FlagsString(r->tcp_flags), r->fwd_status, r->tos, (unsigned long long)r->dPkts, (unsigned long long)r->dOctets, (long long unsigned)r->out_pkts, (long long unsigned)r->out_bytes); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/output_fmt.c new/nfdump-1.6.20/bin/output_fmt.c --- old/nfdump-1.6.19/bin/output_fmt.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/output_fmt.c 2020-03-29 12:00:43.000000000 +0200 @@ -72,7 +72,7 @@ static int do_tag = 0; static int long_v6 = 0; -static int scale = 1; +static int printPlain = 0; static double duration; #define STRINGSIZE 10240 @@ -538,7 +538,7 @@ char *c, *s, *h; int i, remaining; - scale = plain_numbers == 0; + printPlain = plain_numbers; InitFormatParser(); @@ -728,7 +728,7 @@ static void String_Protocol(master_record_t *r, char *string) { - snprintf(string, MAX_STRING_LENGTH-1 ,"%-5s", ProtoString(r->prot)); + snprintf(string, MAX_STRING_LENGTH-1 ,"%-5s", ProtoString(r->prot, printPlain)); string[MAX_STRING_LENGTH-1] = '\0'; } // End of String_Protocol @@ -1081,7 +1081,7 @@ static void String_InPackets(master_record_t *r, char *string) { char s[NUMBER_STRING_SIZE]; - format_number(r->dPkts, s, scale, FIXED_WIDTH); + format_number(r->dPkts, s, printPlain, FIXED_WIDTH); snprintf(string, MAX_STRING_LENGTH-1 ,"%8s", s); string[MAX_STRING_LENGTH-1] = '\0'; @@ -1090,7 +1090,7 @@ static void String_OutPackets(master_record_t *r, char *string) { char s[NUMBER_STRING_SIZE]; - format_number(r->out_pkts, s, scale, FIXED_WIDTH); + format_number(r->out_pkts, s, printPlain, FIXED_WIDTH); snprintf(string, MAX_STRING_LENGTH-1 ,"%8s", s); string[MAX_STRING_LENGTH-1] = '\0'; @@ -1099,7 +1099,7 @@ static void String_InBytes(master_record_t *r, char *string) { char s[NUMBER_STRING_SIZE]; - format_number(r->dOctets, s, scale, FIXED_WIDTH); + format_number(r->dOctets, s, printPlain, FIXED_WIDTH); snprintf(string, MAX_STRING_LENGTH-1 ,"%8s", s); string[MAX_STRING_LENGTH-1] = '\0'; @@ -1108,7 +1108,7 @@ static void String_OutBytes(master_record_t *r, char *string) { char s[NUMBER_STRING_SIZE]; - format_number(r->out_bytes, s, scale, FIXED_WIDTH); + format_number(r->out_bytes, s, printPlain, FIXED_WIDTH); snprintf(string, MAX_STRING_LENGTH-1 ,"%8s", s); string[MAX_STRING_LENGTH-1] = '\0'; @@ -1392,7 +1392,7 @@ } else { bps = 0; } - format_number(bps, s, scale, FIXED_WIDTH); + format_number(bps, s, printPlain, FIXED_WIDTH); snprintf(string, MAX_STRING_LENGTH-1 ,"%8s", s); string[MAX_STRING_LENGTH-1] = '\0'; @@ -1407,7 +1407,7 @@ } else { pps = 0; } - format_number(pps, s, scale, FIXED_WIDTH); + format_number(pps, s, printPlain, FIXED_WIDTH); snprintf(string, MAX_STRING_LENGTH-1 ,"%8s", s); string[MAX_STRING_LENGTH-1] = '\0'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/output_fmt.h new/nfdump-1.6.20/bin/output_fmt.h --- old/nfdump-1.6.19/bin/output_fmt.h 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/output_fmt.h 2020-03-29 12:00:43.000000000 +0200 @@ -52,7 +52,7 @@ void text_epilog(void); -int ParseOutputFormat(char *format, int plain_numbers, printmap_t *printmap); +int ParseOutputFormat(char *format, int printPlain, printmap_t *printmap); void format_special(void *record, char ** s, int tag); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/output_raw.c new/nfdump-1.6.20/bin/output_raw.c --- old/nfdump-1.6.19/bin/output_raw.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/output_raw.c 2020-03-29 12:00:43.000000000 +0200 @@ -163,7 +163,7 @@ " (src)tos = %3u\n" " (in)packets = %10llu\n" " (in)bytes = %10llu\n", - r->fwd_status, r->tcp_flags, FlagsString(r->tcp_flags), r->prot, ProtoString(r->prot), r->tos, + r->fwd_status, r->tcp_flags, FlagsString(r->tcp_flags), r->prot, ProtoString(r->prot, 0), r->tos, (unsigned long long)r->dPkts, (unsigned long long)r->dOctets); _slen = strlen(data_string); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/output_util.c new/nfdump-1.6.20/bin/output_util.c --- old/nfdump-1.6.19/bin/output_util.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/output_util.c 2020-03-29 12:00:43.000000000 +0200 @@ -185,10 +185,10 @@ "MPLS" // 137 MPLS-in-IP }; -char *ProtoString(uint8_t protoNum) { +char *ProtoString(uint8_t protoNum, uint32_t printPlain) { static char s[16]; - if ( protoNum >= NumProtos ) { + if ( protoNum >= NumProtos || printPlain) { snprintf(s,15,"%-5i", protoNum ); s[15] = '\0'; return s; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/output_util.h new/nfdump-1.6.20/bin/output_util.h --- old/nfdump-1.6.19/bin/output_util.h 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/output_util.h 2020-03-29 12:00:43.000000000 +0200 @@ -44,7 +44,7 @@ } printmap_t; -char *ProtoString(uint8_t protoNum); +char *ProtoString(uint8_t protoNum, uint32_t plainNumbers); int ProtoNum(char *protoString); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/profile.c new/nfdump-1.6.20/bin/profile.c --- old/nfdump-1.6.19/bin/profile.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/profile.c 2020-03-29 12:00:43.000000000 +0200 @@ -90,7 +90,7 @@ return 0; } - strncat(stack, string, *buff_size ); + strncat(stack, string, len); *buff_size -= len; return 1; @@ -210,7 +210,7 @@ return; } - strncpy(filter, source_filter, strlen(filter)); + strncpy(filter, source_filter, strlen(source_filter)); p = filter + strlen(source_filter); ret = read(ffd, (void *)p, stat_buf.st_size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/util.c new/nfdump-1.6.20/bin/util.c --- old/nfdump-1.6.19/bin/util.c 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/util.c 2020-03-29 12:00:43.000000000 +0200 @@ -536,10 +536,10 @@ } // End of InsertString -void format_number(uint64_t num, char *s, int scale, int fixed_width) { +void format_number(uint64_t num, char *s, int printPlain, int fixed_width) { double f = num; - if ( !scale ) { + if ( printPlain ) { snprintf(s, 31, "%llu", (long long unsigned)num); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/bin/util.h new/nfdump-1.6.20/bin/util.h --- old/nfdump-1.6.19/bin/util.h 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/bin/util.h 2020-03-29 12:00:43.000000000 +0200 @@ -115,11 +115,9 @@ time_t ISO2UNIX(char *timestring); #define NUMBER_STRING_SIZE 32 -#define DONT_SCALE_NUMBER 0 -#define DO_SCALE_NUMBER 1 #define FIXED_WIDTH 1 #define VAR_LENGTH 0 -void format_number(uint64_t num, char *s, int scale, int fixed_width); +void format_number(uint64_t num, char *s, int printPlain, int fixed_width); void SetupInputFileSequence(char *multiple_dirs, char *single_file, char *multiple_files); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/configure.ac new/nfdump-1.6.20/configure.ac --- old/nfdump-1.6.19/configure.ac 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/configure.ac 2020-03-29 12:00:43.000000000 +0200 @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_REVISION($Revision: 244 $)dnl -AC_INIT(nfdump, 1.6.19, pe...@people.ops-trust.net) +AC_INIT(nfdump, 1.6.20, pe...@people.ops-trust.net) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([subdir-objects]) @@ -147,7 +147,7 @@ else AC_MSG_ERROR(Required rrd.h header file not found!) fi - AC_RUN_IFELSE( + AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[ #include <stdio.h> @@ -202,7 +202,7 @@ else AC_MSG_ERROR(Required rrd.h header file not found!) fi - AC_RUN_IFELSE( + AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[ #include <stdio.h> @@ -243,7 +243,7 @@ else AC_MSG_ERROR(Required pcap.h header file not found!) fi - AC_RUN_IFELSE( + AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [[ #include <stdio.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/extra/docker/readme new/nfdump-1.6.20/extra/docker/readme --- old/nfdump-1.6.19/extra/docker/readme 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/extra/docker/readme 2020-03-29 12:00:43.000000000 +0200 @@ -32,9 +32,9 @@ && rm -rf /var/lib/apt/lists/* RUN cd /usr/src \ - && wget https://github.com/phaag/nfdump/archive/v1.6.19.zip \ - && unzip v1.6.19.zip \ - && cd nfdump-1.6.19\ + && wget https://github.com/phaag/nfdump/archive/v1.6.20.zip \ + && unzip v1.6.20.zip \ + && cd nfdump-1.6.20\ && mkdir m4 \ && ./autogen.sh \ && ./configure --enable-nfprofile --enable-sflow \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/extra/nfdump.spec new/nfdump-1.6.20/extra/nfdump.spec --- old/nfdump-1.6.19/extra/nfdump.spec 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/extra/nfdump.spec 2020-03-29 12:00:43.000000000 +0200 @@ -1,6 +1,6 @@ Name: nfdump Summary: A set of command-line tools to collect and process netflow data -Version: 1.6.19 +Version: 1.6.20 Release: 1 License: BSD Group: Applications/System @@ -41,4 +41,4 @@ %changelog * Thu Jan 03 2019 Richard REY <Rexy> -- Version 1.6.19 (used in ALCASAR 3.3.3) +- Version 1.6.20 (used in ALCASAR 3.3.3) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfdump-1.6.19/man/nfdump.1 new/nfdump-1.6.20/man/nfdump.1 --- old/nfdump-1.6.19/man/nfdump.1 2020-02-22 08:39:45.000000000 +0100 +++ new/nfdump-1.6.20/man/nfdump.1 2020-03-29 12:00:43.000000000 +0200 @@ -1152,7 +1152,7 @@ .I Type of Service (TOS) \fI[SourceDestination]\fR \fBtos <num>\fR .br -With \fI<num>\fR 0..255. For compatibility with nfump 1.5.x: +With \fI<num>\fR 0..255. For compatibility with nfdump 1.5.x: \fBtos <num>\fR is equivalent with \fBsrc tos <num>\fR .TP 4 .I Packets per second: Calculated value.