-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Burton M. Strauss III wrote:
| Why do you think it's dodgy?
|
| "<TD ALIGN=CENTER>196.38.54.68</TD>\0 ^^ ends the c string
|
| So it's just perfectly normal html - whatever was in the buffer
| from the last time it was used.
|
| The failing code (you snipped just a few lines too many - using the
|
gdb list
| command shows +-5)
|
| for(ifaddr = myGlobals.device[i].v6Addrs; ifaddr != NULL; ifaddr =
| ifaddr->next) { if(snprintf(buf, sizeof(buf), "%s/%d<br>",
| _intop(&ifaddr->af.inet6.ifAddr, buf1, sizeof(buf1)),
| ifaddr->af.inet6.prefixlen) < 0) BufferTooShort(); sendString(buf);
| }
|
| Usually a SIGSEGV in xprintf() means an invalid conversion of a
number, e.g.
| ifaddr is NULL. But if you look at the for() loop, that's the end
| condition... So, we're left with a bad conversion in _intop().
|
| Your gdb output doesn't show ifaddr (that's why we suggest doing bt
|
full -
| it shows all the local variables).
|
| Please post the bt full output.
|
| Thanks!
|
| -----Burton
|
|
Burton,Here is the full backtrace:
(gdb) bt full
#0 0x280b47bf in printTrafficStatistics (revertOrder=0) at report.c:268
~ unicastPkts = 17179885568
~ avgPktLen = 672224517
~ i = 0
~ buf = "<TD
ALIGN=CENTER>196.38.54.68</TD>\0\0\0\0\0�\005*)\0\0\0\0����\0\0\0\0\020l��\0�f\b\020m��\a�I)\a�I)�<\0\0\001m\037)\0\0\0\00l��\0�f\b\004\002\037)\0\0\0\001\0\0\0\0
\202\b\0\0\0\0\0tl���\006(�<I)�\005y\r\0t\b(\001\0\0\0\0\0\0\0\0t\b(\0\0\0\001�\034\b(\0{\b(\0347I)4m���\006(�<I)�\005y\r�\b\b(\bm��\001\0\0\0\fm��\0p\b("...
~ formatBuf =
"\0\0\0\0\0\0\0\0�m���c\035)p\024\b\b��\035)(m��\204�\034)"
~ formatBuf1 = '\0' <repeats 28 times>, "�c\035)"
~ statbuf = {st_dev = 16384, st_ino = 3215485764, st_mode =
27464, st_nlink = 49064, st_uid = 2748779069,
~ st_gid = 671105015, st_rdev = 3215486113, st_atimespec = {tv_sec =
0, tv_nsec = 690671904}, st_mtimespec = {
~ tv_sec = -1079481008, tv_nsec = 690745888}, st_ctimespec = {tv_sec
= -1079481480, tv_nsec = 690559423},
~ st_size = -4636335625322368480, st_blocks = 2965702414268628992,
st_blksize = 690671904, st_flags = 1,
~ st_gen = 3215486344, st_lspare = 690570964, st_birthtimespec =
{tv_sec = 690745888, tv_nsec = -1079481008}}
~ pcapStat = {ps_recv = 153427977, ps_drop = 3215486112,
ps_ifdrop = 1}
#1 0x280b2ad2 in returnHTTPPage (pageName=0xbfa87ad1
"trafficStats.html", postLen=-1, from=0xbfa87cf0,
~ httpRequestedAt=0xbfa87688, usedFork=0xbfa87684,
~ agent=0xbfa87990 "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.6) Gecko/20040206 Firefox/0.8",
~ referer=0xbfa87890
"http://mainframe.savuti.co.za:3000/Summary.html") at http.c:1900
~ questionMark = 0x0
~ pageURI = 0x0
~ sortedColumn = 0
~ printTrailer = 1
~ idx = 2
~ errorCode = 0
~ pageNum = 0
~ portNr = 0
~ vsanNr = 0
~ statbuf = {st_dev = 689821364, st_ino = 689821364, st_mode =
30152, st_nlink = 49064, st_uid = 689821364,
~ st_gid = 689821364, st_rdev = 134746496, st_atimespec = {tv_sec =
- -1079478792, tv_nsec = 689784322}, st_mtimespec = {
~ tv_sec = 134746544, tv_nsec = 689812448}, st_ctimespec = {tv_sec =
851, tv_nsec = 689821364}, st_size = 672789604,
~ st_blocks = 2889597337540231168, st_blksize = 672792936, st_flags =
0, st_gen = 3215488520, st_lspare = 689782249,
~ st_birthtimespec = {tv_sec = 672789604, tv_nsec = 0}}
~ fd = (FILE *) 0x0
~ tmpStr = "/usr/local/share/ntop/html/trafficStats.html", '\0'
<repeats 108 times>,
"��\006(�c\035)�\016\024(��\035)�u���c\035)�\021\b\b��\035)�u��\204�\034)�\021\b\b�t���\006(\023\020\t(U�}\002\0r\b(\001\0\0\0\0\0\0\0\0r\b(\0\0\0\001
t��\0�f\bH\0\t(du���t��\0�f\bU�}\002�\b\b(8u��\001\0\0\0<u��\0p\b(\0q\b(\0r\b(",
'\0' <repeats 56 times>...
~ domainNameParm = 0x0
~ revertOrder = 0
~ t = {tm_sec = 0, tm_min = 0, tm_hour = 0, tm_mday = 0, tm_mon
= 0, tm_year = 0, tm_wday = 0, tm_yday = 0,
~ tm_isdst = 0, tm_gmtoff = 0, tm_zone = 0x0}
~ showHostsMode = showAllHosts
~ showLocalityMode = showSentReceived
~ showFcHostsPage = 0
~ vsanId = 0
- ---Type <return> to continue, or q <return> to quit---
~ rc = 672224517
~ i = 672224517
#2 0x280b3b37 in handleHTTPrequest (from=
~ {hostFamily = 2, addr = {_hostIp4Address = {s_addr =
3290560096}, _hostIp6Address = {__u6_addr = {__u6_addr8 =
"`�!�X~���\026\035)\001\0\0", __u6_addr16 = {63072, 50209, 32344,
49064, 5834, 10525, 1, 0}, __u6_addr32 = {3290560096, 3215490648,
689772234, 1}}}}}) at http.c:3083
~ skipLeading = 672224517
~ postLen = -1
~ usedFork = 0
~ requestedURL = "/trafficStats.html", '\0' <repeats 493 times>
~ pw = "4mL2s!nTd6", '\0' <repeats 55 times>
~ agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.6) Gecko/20040206 Firefox/0.8", '\0' <repeats 173 times>
~ referer = "http://mainframe.savuti.co.za:3000/Summary.html",
'\0' <repeats 208 times>
~ rc = 0
~ i = 3
~ httpRequestedAt = {tv_sec = 1079478754, tv_usec = 574203}
~ gzipBytesSent = 0
~ tmpStr = '\0' <repeats 511 times>
#3 0x280f6b3d in handleSingleWebConnection (fdmask=0xbfa87d04) at
webInterface.c:8345
~ from = {sa_len = 16 '\020', sa_family = 2 '\002', sa_data =
"\f��!�`\0\0\0\0\0\0\0"}
~ remote_ipaddr = {hostFamily = 2, addr = {_hostIp4Address =
{s_addr = 1626743236}, _hostIp6Address = {__u6_addr = {
~ __u6_addr8 = "�!�`X~���\026\035)\001\0\0", __u6_addr16 =
{8644, 24822, 32344, 49064, 5834, 10525, 1, 0},
~ __u6_addr32 = {1626743236, 3215490648, 689772234, 1}}}}}
~ from_len = 16
#4 0x280f693e in handleWebConnections (notUsed=0x0) at
webInterface.c:8194
~ rc = 672224517
~ mask = {__fds_bits = {131072, 0 <repeats 31 times>}}
~ mask_copy = {__fds_bits = {131072, 0 <repeats 31 times>}}
~ topSock = 17
#5 0x291cc51e in _thread_start () from /usr/lib/libc_r.so.5
No symbol table info available.
It seems like this piece of code is trying to work with IPV6 addresses, which I choppedout of the kernel. Could this be a possibility? - -- Jaco van Tonder Software Developer Direct: +27 11 312 2122 :: Fax: +27 11 312 2122 :: Mobile: +27 83 417 5424 Email: [EMAIL PROTECTED] :: Web: http://www.coocoo.za.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAV94N/+RQBDvgOO8RAvsoAKCANAP1EJR6Lvd6ahC2+cAiD53/xACgjh+M 5UZKY3vCWBCfjhhfD00VlEA= =u7Du -----END PGP SIGNATURE-----
_______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop-dev
