My version of code must be different. I need to get the latest anyway, so I'll do that.
Gary -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Clark, Philip Sent: Tuesday, March 16, 2010 6:44 AM To: '[email protected]' Subject: Re: [Ntop] Problem with Display of MAC Addresses > I'm not that good at coding, so I'm not seeing what you're > talking about. I would say make a backup copy, modify as you > see fit, and recompile. What's the worst that can happen? I dread to think :) For the original problem, it's just an index that's wrong. Starting at line 423 in address.c, it's taking each byte and stuffing it into a string with the colon separators in place. But the fourth byte (index 3) is there twice and the fifth byte (index 4) is missing. Just changing the second 3 to a 4 solves the problem and ntop is showing correct MAC addresses again. The segfault when I compiled without PARM_USE_MACHASH_INVERT is more of a guess. The conditional block at line 185 in vendor.c sets "ipxsapValue" if we are inverting (default) but sets "idx" otherwise. On the next line, "idx" is unconditionally set to a value derived from "ipxsapValue" which, if we are not inverting, has will not have been assigned any value. It may be that the "else" clause should be setting "ipxsapValue" and not "idx", but I don't know if the rest of that line would be correct in that case. The other option is that the conditional statement should apply to "idx", like so: ipxsapValue = 256*256*(unsigned long)(entry->ipxsapId & 0xff) + 256*(unsigned long)((entry->ipxsapId >> 8) & 0xff) + (unsigned long)((entry->ipxsapId >> 16) & 0xff); #ifdef PARM_USE_MACHASH_INVERT idx = (u_int)(entry->ipxsapId % tableLen); #else idx = (u_int)((u_int)ipxsapValue % tableLen); #endif Cheers, Phil. ********************************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the NHS Borders Servicedesk on 01896 82 77 77. Opinions expressed herein are those of the sender and do NOT represent the corporate position of NHS Borders This footnote also confirms that this email message has been swept by MIMEsweeper. *** NHS Borders ******************************************************************* _______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop <font size="1"> <div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in'> </div> "This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system." </font> _______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop
