[Swan-dev] [Swan-commit] Changes to ref refs/heads/master

Paul Wouters paul at nohats.ca
Thu Feb 28 16:47:58 UTC 2019

On Thu, 28 Feb 2019, Andrew Cagney wrote:

>> New commits:
>> commit c46b7d010ba30670a768b1651070a666211e648c
>> Author: Paul Wouters <pwouters at redhat.com>
>> Date:   Wed Feb 27 23:24:24 2019 -0500
>>     IKEv1: Another follow up on aa6b8949
>>     It also broke msgid handling for DPD and DELETE routines.
> I suspect this doesn't fix the bug (I went through and tracked down
> and fixed all the cases that caused a test fail, this one didn't come
> up):
> - the host ordered msgid and stored in the header, will be switched to
> network order on the way out
> - so the hash code should be fed the hton(msgid) value (in fact, there
> are so many cases of the same code it should be moved to a function)

interop tests show it did fix it :)

One issue is that the msgid is random, and if you stuff it in the
ike header using the struct, it is assumed host order and will be
flipped by out_struct()

The hash calculation therefor needs the flipped version to do its hash

I agree we could use a single function for this.

Note there is one case where this must not be done. I left a comment.

See c46b7d010ba30670a7


More information about the Swan-dev mailing list