Clearing state in network stack
From
Francis Guzikowski@21:1/5 to
All on Sat Aug 15 13:12:18 2020
I'm looking into the Vxworks6 network stack, with the sample downloadbale kernel module ball project from the workbench guide, and am trying to clear any parts of the stack possible by either destroying tNet0 and re-initializing it, calling free() on
tNet0's jobQueue or deleting jobs, or freeing the memory_pool/memory_slab/netPool struct.
I tried first with deleting tNet0 (formerly tNetTask) by calling taskDelete() then netLibInitialize() (I believe shouldn't be called besides at startup) but then I can't ping the IP address so that fails.
Calling free(&netDaemons[0].jobQueue) doesn't seem to stop the ongoing TCP connection I'm using for testing and trying to access delete a specific job is hard because I can't get the correct info for each job and the address for netDaemons[0].jobQueue
seems wrong as the debug info for that variable is mostly garbage.
Finally, I'm exploring freeing the memory pool but can't seem to access the ipcom_memory_pool_free(), jobQueueTerminate() functions because it's located in ipcom_generic_slab.c I can't get imported succesfully. I pasted in the functionality of deleting
and freeing a job queue object, with a forceful modification to clear when malicious data is in the stack. When trying to access the memory pool (pStdPool = jobQueueId->pStdPool;), I get a segmentation violation. After removing this, the entire project
seems to be corrupted.
netPoolDestroy(), freeing underlying netPool struct memory and calling netPoolCreate() seems promising but I can't find the netPool used in the first place (debugging flag for this function in target/h/wrn/coreip/netBufLib.h file doesn't get triggered)
Please let me know which approach is correct!
P.S. I also have the idea of making a new network task that will be used as a sort of shield from the real tNet0--I can then reset this newer task and not break vxworks in the case of memory corruption.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)