24
« Last post by Ray on July 26, 2023, 07:36:23 PM »
Hi Mark,
Yes, I believe ARP is not the root cause, rather, it is possible the ARP process is just a little overwhelmed in my noisy network envornment.
The ARP request for 172.22.0.1 is for the gateway, probably for NTP - I've disabled this for now.
I mistakenly changed one of the ARP_IGNORE_FOREIGN_ENTRIES in static void fnSendARP_response(ARP_INPUT *ptrArpInput)
On line 682, if we received our own ARP request, it wasn't being added, I have fixed this.
What I meant to comment out was your suggestion in fnHandleARP_response()
That is now commented out with the preprocessor, however it didn't fix the problem of extra ARP entires.
Additionally, there is an instance of fnAddARP() located in ip.c line 688
This was adding all the misc ARP's it received, I have diabled with the preprocessor, now my ARP table has 3 and only 3 entries (+ broadcast)
This didn't resovle my trap problem. The symptom was trap manager 1 worked but 2 or 3 didn't.
As always your amazing debugger to the rescue and discovered in static int fnSendTrap() function, line 1099 fnSendUDP() has extra information OR'd into the SocketHandle and would fail the first check.
Commenting this allows traps beyond manager 1 to send /* | ptrSNMP_manager_details[iManagerRef].snmp_manager_details | ((iManagerRef & USER_INFO_MASK) << USER_INFO_SHIFT)*/
I have no idea what those values are for, but commenting them out allows my 3 managers to receive traps.
if (fnSendUDP((USOCKET)(SNMPSocketNr /* | ptrSNMP_manager_details[iManagerRef].snmp_manager_details | ((iManagerRef & USER_INFO_MASK) << USER_INFO_SHIFT)*/) ,(unsigned char*)ptrSNMP_manager_details[iManagerRef].snmp_manager_ip_address, SNMP_MANAGER_PORT, (unsigned char*)&UDP_Message.tUDP_Header, (unsigned short)iNewLength, OWN_TASK) == NO_ARP_ENTRY)
which failes the first check of fnSendUDP(USOCKET SocketHandle, unsigned char *dest_IP, unsigned short usRemotePort, unsigned char *ptrBuf, unsigned short usDataLen, UTASK_TASK OwnerTask)
if (_UDP_SOCKET_MASK(SocketHandle) > UDP_SOCKETS) { // {7}
return INVALID_SOCKET_HANDLE;
}
Cautiously, all is well...I'm running a 5 day blast on coldstart traps to make sure we don't bog down.
Thank You
Ray