[Swan-dev] question from IRC: does IKEv1 do auto-fill of NP?
D. Hugh Redelmeier
hugh at mimosa.com
Fri Sep 7 12:54:18 UTC 2018
IKEv1 packet.h routines will fill in the next payload field automatically.
This was done by extending what Andrew had already done for v2.
It is intended for this to be set up correctly but removing the
pre-computing code might expose flaws. I don't expect any since the
automatic code checks that any already-filled-in next payload field
checks to see that the field is either unfilled or is already
filled with what it would have used.
This should be visible in the debug output.
One known flaw: in one routine ID payloads are just echoed from the input
payload into the output payload. The appropriate packet.h routines for
payload emission are not called. The proper next payload values are
jammed directly into the output buffer. Ugly, but it seems to work. I
haven't taken the time to rework that code.
More information about the Swan-dev
mailing list