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



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!

BR,
blue
_______________________________________________
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

  • Re: [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! ... Software is harder than hardware so better get it right the first time. ...
    (freebsd-net)
  • Re: Decode field and generate continuous subform records
    ... will not be changing in structure anytime soon. ... You can then join that to your lookup table and show the lookup value ... It contains a series of three digit codes ... >> a reference table to find the description and then display each record on ...
    (microsoft.public.access.formscoding)
  • RE: find all zip codes in a specified radius in an Access database
    ... > Right now I use Zip Distance Wizard or Zipoid ... > and then check my database records against the resulting list. ... I cannot find any reference to a table of zip codes and their geographic ...
    (microsoft.public.access.modulesdaovba)
  • Re: Important question on LDPC
    ... I'm studying this paper "Low-Density Parity-Check (LDPC) Codes ... if you provide a full reference. ... have to spend a lot of work finding it first. ...
    (comp.dsp)
  • Re: Important question on LDPC
    ... I'm studying this paper "Low-Density Parity-Check (LDPC) Codes ... if you provide a full reference. ... have to spend a lot of work finding it first. ...
    (comp.dsp)