Subject: Re: CVS commit: src/sys/netkey
To: None <itojun@itojun.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: source-changes
Date: 06/01/2004 10:18:59
> > > > > - still leaks mbufs in the cases of ENOBUF?
> > > > 
> > > > 	no, we loss "m" due to pullup.
> > > 
> > > m will be lost, but m->m_nextpkt isn't.
> > 
> > it seems that you already fixed it.  sorry for noise.
> > 
> > however, with keysock.c rev.1.34,
> > kp_queue will be stamped in the case of !canwait && ENOBUFS.
> > i think that it's better to always consult kp_queue first.
> > (ie. "if (canwait)" -> "if (1)".)
> 
> 	i intentionally deferred the use of kp_queue as SADB_DUMP is less
> 	important than other operations.  i don't think there's many IPsec key
> 	management daemon which issues PF_KEY operation concurrently, but
> 	anyways, this is the thought behind that "if (canwait)" clause.
> 
> itojun

it makes sense, but defferred to where?
if i read the code correctly, !canwait requests overwrite kp_queue and
old mbufs linked on kp_queue will be leaked.

YAMAMOTO Takashi