(racoon 893) Re: "DOI value of CONNECTED Notify Message has problem"

Satoshi Inoue <[email protected]> Tue, 11 Jan 2005 10:13:02 +0900
Newsgroups gmane.network.ipv6.kame.racoon
Message-ID <[email protected]>
On Fri, 7 Jan 2005 21:54:54 +0900
"Haoda" <[email protected]> wrote:

> But I found the recevicing result is strange. The value of "DOI" field is
> "16777216", but 
> I think the right value is 1 according with RFC2408. The binary format of
> "16777216" is
> "1000000000000000000000000", just the reversed bit order of
> "0000000000000000000000001".

Try this.

--- isakmp_quick.c.bak  Tue Jan 11 10:09:32 2005
+++ isakmp_quick.c      Tue Jan 11 10:09:32 2005
@@ -1511,7 +1511,7 @@
        n = (struct isakmp_pl_n *)notify->v;
        n->h.np = ISAKMP_NPTYPE_NONE;
        n->h.len = htons(tlen);
-       n->doi = IPSEC_DOI;
+       n->doi = htonl(IPSEC_DOI);
        n->proto_id = iph2->approval->head->proto_id;
        n->spi_size = sizeof(iph2->approval->head->spisize);
        n->type = htons(ISAKMP_NTYPE_CONNECTED);