On Wed, 2 Jan 2019 at 15:55, D. Hugh Redelmeier <[email protected]> wrote:
>
> New commits:
> commit 20f4002247ba4540cdc3b4ebe6f7c73828682649
> Author: D. Hugh Redelmeier <[email protected]>
> Date: Wed Jan 2 15:54:08 2019 -0500
>
> pluto: rename and remodularize emit_v2N*
Why? We had emit_v2V() emit_v2N() emit_v2UNKNOWN() et.al., now we don't?
My best guess is that it was motivated by the comment and code:
/*
* XXX: can this share code with emit_v2N() above?
*/
struct ikev2_notify n = {
.isan_critical = build_ikev2_critical(false),
.isan_protoid = PROTO_v2_RESERVED,
.isan_type = v2N_SIGNATURE_HASH_ALGORITHMS,
};
pb_stream n_pbs;
if (!out_struct(&n, &ikev2_notify_desc, outs, &n_pbs)) {
but that could have all been done by adding a static out_v2N(...,
nested_pbs, ...) and having just the above and emit_v2N() call it?
These assertions were removed. Why?
passert((protoid == PROTO_v2_RESERVED) == (spi == NULL));
passert((protoid == PROTO_v2_AH || protoid == PROTO_v2_ESP) == (spi != NULL));
> - new names specify what should be included in the payload
> "sa": an SA (i.e. protoid and SPI)
> "chunk": a chunk
> "pl": a sub-payload will be added by the caller.
>
> - changed emit_* to out_* so uncommited change won't silently fail
I've no clue what this even means?
> - provide for callers to emit sub-payloads after the call.
> This will be exploited later.
Er, it's used above?
> - eliminated a leak in add_redirect_payload
That sounds serious enough to deserve a separate commit.
> _______________________________________________
> Swan-commit mailing list
> [email protected]
> https://lists.libreswan.org/mailman/listinfo/swan-commit
_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev