Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: linux-ipsec: Patches for the Alpha.

From: Peter Onion <ponion(at)srd.bt.co.uk>
Date: Wed Dec 09 1998 - 11:54:33 EST

On 08-Dec-98 Richard Guy Briggs wrote:
> -----BEGIN PGP SIGNED MESSAGE-----

>> I'm about ready to produce the patches from my DEC Alpha porting work.

>
> Excellent!
>

Its taken a bit longer that I expected as I decided to tidy up all the compiler warnings that come from all the dubious casts in many of the DEBUG printks...

Also I think this may be a bug...

pluto/kernel.c/setup_ipsec_sa near the very end

fail:

    {

        /* undo the done SPIs */
        while (r_said_next-- != r_said)
            (void) del_spi(fd, (u_char *)r_said_next->spi,
r_said_next->proto
                , c->this.host);

        while (s_said_next-- != s_said)
            (void) del_spi(fd, (u_char *)s_said_next->spi, s_said_next->proto
                , c->that.host);
        return FALSE;

    }
}

The compiler complains about the "(u_char *)" casts. "r_said_next->spi" is an "ipsec_spi_t" which is an "u_int32_t", and del_spi wants a "const u_char spi[IPSEC_DOI_SPI_SIZE]" as its paramemter which is the same as "const u_char *spi" ( I looked in K&R just to make sure :-) )   

Do you need help?X

Well IPSEC_DOI_SPI_SIZE is 4, so alteast its the same as a u_int32_t, but I think there is a missing "&" eg I think it should be ....

(u_char *) &r_said_next->spi

which the compiler is happy about....

Before I release the patches I need to check that my changes haven't created any problems when built on an Intel box...

Another couple of things...

I've used libdes-4.04b.tar.gz from Eric A Young as this newer version needed little work to get it right on the Alpha and required only minimal changes to the make files... it untars into a directory called des, so just rename it to libdes and all is OK. I'll check that nothing more needes to be done before I post my patches.

ftp://ftp.psy.uq.oz.au/pub/Crypto/DES/libdes-4.04b.tar.gz

The gmp libraries need to be configured for the Alpha before you run make for the first time.. This needs to me mentioned in the INSTALL file.

Do you need more help?X

Can't think of anything else right now.....

Peter Onion.



E-Mail: Peter Onion <ponion@srd.bt.co.uk> Date: 09-Dec-98
Time: 16:26:13

This message was sent by XFMail


Received on Wed Dec 9 11:52:12 1998

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:59:09 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library