Re: [ipsec] KEY_FREESAV() in FreeBSD-Release7.0



On Tue, 8 Apr 2008, blue wrote:

Hi,

Dear all:

About the KEY_FREESAV() in key_checkrequest() in key.c:

line 806:
if (isr->sav != NULL) {
KEY_FREESAV(&isr->sav);
isr->sav = NULL;
}

The codes are only going to free the sav used LAST TIME. For outgoing SA entries, the reference count will be always 2, instead of 1 like incoming SA. I thought the proper place to call KEY_FREESAV() should be ipsec6_output_trans() and ipsec6_output_tunnel() after invoking each transform's output function. Then the SA will be freed after its usage rather than being freed if there's next IPsec packet.

If the above condition is accpeted, then key_delsp() in key.c should not call KEY_FREESAV() in case SA reference count underflow!

Can you please file a PR for this as well?


Thanks

--
Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT
Software is harder than hardware so better get it right the first time.
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • [ipsec] KEY_FREESAV() in FreeBSD-Release7.0
    ... The codes are only going to free the sav used LAST TIME. ... If the above condition is accpeted, then key_delspin key.c should not call KEY_FREESAVin case SA reference count underflow! ...
    (freebsd-net)
  • MissingMethodException when method isnt missing...
    ... resets, deleted bin/obj directories, rebooted the desktop. ... project reference to B and I've tried a direct reference to project B's dll. ... The error messages: ... So it looks like it loaded it the first time, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Help! Formula that can Ref. hidden data & Populate Cells with desired text
    ... This is the first time I have ever posted a question on the internet, ... a user would only need to enter a desired req. ... I think its the LOOKUP (or maybe something to do with a REFERENCE) ... comes to figuring out how to turn that row/column reference into the ...
    (microsoft.public.excel.worksheet.functions)
  • looking up data in another column & populating another cell
    ... This is the first time I have ever posted a question on the internet, ... a user would only need to enter a desired req. ... I think its the LOOKUP (or maybe something to do with a REFERENCE) ... comes to figuring out how to turn that row/column reference into the ...
    (microsoft.public.excel.newusers)
  • Re: boot problems with Server 320 (8640-MY0)
    ... The first time I hit the problem I saw a "1800PCI" or similar ... cleaning the screens and wiggling some of the ... Anyone have data on the undocumented codes I was getting? ... is in the user's handbook. ...
    (comp.sys.ibm.ps2.hardware)