Package: flow-tools
Version: 1:0.67-8
Severity: important
Tags: patch

1) -m fields. man example :
~> flow-export -f3 -mSRCADDR,DSTADDR,DOCTETS -u 
"user:password:host:port:name:table" < flow
flow-export: Out of order field: DOCTETS
flow-export: ftxfield_parse(): failed

However, -m0x0000000000003040LL (the same) works ok.

2) postgresql export 
/usr/bin/flow-export -f5 -m0x0000000000003040LL -u 
"user:password:host:5432:name:table" < flow

flow-export: Missing field in dbaseURI, expecting
user:pwd:host:port:name:table.
/usr/bin/flow-export: Exported 0 records

fix :
src/flow-export.c, line 896 should look like this
   if (!db_user || !db_pwd || !db_host || !db_port || !db_name || !db_table) {

(db_port instead of db_tmp, db_tmp declaration at line 869 may be removed.)

Actually, PQsetdbLogin should be replaced with PQconnectdb as
PQsetdbLogin is deprecated and exists mainly to support legacy applications. 
But this is upstream problem.

3) postgresql export, " quotation for SRCADDR, DSTADDR, NEXTHOP, PEER_NEXTHOP,  
EXADDR, ROUTER_SC
fields is used so queries with such fileds will fail. its ok for mysql
but in pgsql " style quotation may be used only for database objects
and table fields.

fix : 
src/flow-export.c, lines 1204, 1207, 1262, 1280, 1283, 1380, 1383, 1389,
1392 should be
if (quote) fmt_buf[len++] = '\'';

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-1-686-smp
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.koi8r (charmap=KOI8-R) (ignored: 
LC_ALL set to ru_RU.koi8r)

Versions of packages flow-tools depends on:
ii  libc6                  2.3.5-6           GNU C Library: Shared libraries an
ii  libmysqlclient12       4.0.24-10sarge1   mysql database client library
ii  libpq3                 7.4.7-6sarge1     PostgreSQL C client library
ii  libwrap0               7.6.dbs-8         Wietse Venema's TCP wrappers libra
ii  zlib1g                 1:1.2.2-4.sarge.2 compression library - runtime

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to