Fixes a crash due to the memory of the newly allocated syncache entry

in syncache_lookup() is not cleared and may lead to an arbitrary and
bogus rtentry pointer which later gets free'd.

Reviewed by: andre
MFC after: 3 days
This commit is contained in:
Qing Li 2006-02-07 19:59:46 +00:00
parent 222fdf4bff
commit 737b12e98f

@ -1386,6 +1386,7 @@ syncookie_lookup(inc, th, so)
* Fill in the syncache values.
* XXX duplicate code from syncache_add
*/
bzero(sc, sizeof(*sc));
sc->sc_ipopts = NULL;
sc->sc_inc.inc_fport = inc->inc_fport;
sc->sc_inc.inc_lport = inc->inc_lport;