In function "olsr_sendto" from file /src/bsd/net.c, if SPOOF is true means olsr compiled for FREEBSD the libnet causes memory overflow as there are number of return(0)'s in this function and libnet_destroy (context) is not called before that and libnet_write (context) gives error if any interface is given in olsrd.conf but its not up/active so that way memory is not being freed as it return after error. I put libnet_destroy (context) before every return(0) except the first one where the context is NULL. Modified net.c is attached for reference.Tested okay.
jaspreet bajwa
jps_bajwa@hotmail.com
/src/bsd/net.c