Darren,

        Sorry to bother again. But my colleagues keep asking if you can
take this fix into pfil module. Or you think
We'd better use it in our side? Attached is patch file to pfil2.1.7.

Regards,
Lan Zang(Sander)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Zang, Lan
(Sander)
Sent: Tuesday, June 26, 2007 17:33 PM
To: Darren Reed
Cc: [EMAIL PROTECTED]; [email protected]
Subject: RE: IPsec Tunnel problem seek confirm from author or anyone
knows

Darren,

        Do you agree that I just add the single condition before clear
qif->qf_hl in qif_attach()? That is just
if (qif->qf_hl == 0)
???

Regards,
Sander

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Zang, Lan
(Sander)
Sent: Thursday, June 21, 2007 9:14 AM
To: Darren Reed
Cc: [EMAIL PROTECTED]; [email protected]
Subject: RE: IPsec Tunnel problem seek confirm from author or anyone
knows

Darren,

        There are two reasons for which I do not agree.
        1) The ill_hdr_length member of struct ill_t is defined only
when SOLARIS2 < 8. You can't use ill->ill_hdr_length in
Solaris8 or above.
        2) If I'd use this condition the whole code would be(suppose it
is in solaris7 or below). I think the second condition Is not needed. I
mean if ill->ill_hdr_length IS 0, qif->qf_hl will not be modified
anyway(it is 0 already).
if (qif->qf_hl == 0 && ill->ill_hdr_length != 0) {
        qif->qf_hl = ill->ill_hdr_length;
}

        So, here my question is do you mean '||' instead of '&&' like
the following line?
if (qif->qf_hl == 0 || ill->ill_hdr_length != 0)

        If so, the codes shall be
#if SOLARIS2 < 8
     If (qif->qf_hl == 0 || ill->ill_hdr_length != 0){
        qif->qf_hl = ill->ill_hdr_length;
     }
#else
        if ((qif->qf_hl == 0) || ((ill->ill_type > 0) && (ill->ill_type
< 0x37) &&
            (hdrsizes[ill->ill_type][0] == ill->ill_type) &&
(hdrsizes[ill->ill_type][1] != 0)))
                qif->qf_hl = hdrsizes[ill->ill_type][1];

        if (qif->qf_hl == 0 && ill->ill_type != IFT_OTHER) {
                cmn_err(CE_WARN,
                        "!Unknown layer 2 header size for %s type %d sap
%x\n",
                        qif->qf_name, ill->ill_type, ill->ill_sap);
        }
#endif

        These codes also works. Which one do you prefer?

Regards,
Sander

-----Original Message-----
From: Darren Reed [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 20, 2007 14:29 PM
To: Zang, Lan (Sander)
Cc: [EMAIL PROTECTED]; [email protected]
Subject: Re: IPsec Tunnel problem seek confirm from author or anyone
knows

Does it work for you if you change your if() to be:

if (qif->qf_hl == 0 && ill->ill_hdr_length != 0)

?

Darren



Attachment: patch-pfil2.1.7
Description: patch-pfil2.1.7

Reply via email to