[netflow-tools] A small bug
章晋学
zhangjinxue at cernet.edu.cn
Tue Jul 10 12:29:33 EST 2007
Dear Mr. Miller,
When I ran flowd-0.9 in my Sparc64 box, I found that when a v9
template arrives, the same DEBUG info will show:
“short netflow v.9 flowset template
0x00000011/0x00000104 88 bytes from *.*.*.*”, so I can’t receive data
flowsets
It is abnormal because I can receive netflow v9 data in my 32-bits
box by flowd-0.9. Through debugging, I think the 883th line in flowd.c
maybe incorrect since “tmplr” is a pointer or address.
So
sizeof(tmplr)= 4 in 32-bits box;
=8 in 64-bits box;
When I rewrite it as sizeof(*tmplr), it work normally both in 32-bits and
64-bits box.
879 tmplr = (struct NF9_TEMPLATE_FLOWSET_RECORD
*)
880 (pkt + offset);
881 recs[i].type = ntohs(tmplr->type);
882 recs[i].len = ntohs(tmplr->length);
883 offset += sizeof(tmplr);
884 #ifdef DEBUG_NF9
885 logit(LOG_DEBUG, " record %d: type %d len
%d",
886 i, recs[i].type, recs[i].len);
887 #endif
Best wishes
Jinxue Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mindrot.org/pipermail/netflow-tools/attachments/20070710/20b65e82/attachment.html
More information about the netflow-tools
mailing list