[Swan-dev] ROOF changes in commit 91a1e8537

Paul Wouters paul at nohats.ca
Mon Mar 13 09:29:24 UTC 2017

I noticed:

commit 91a1e853710771cc2e4f08359792c35750b9b930
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Sat Mar 11 17:35:38 2017 -0500

     pluto: adjust code to reflect meaning of "roof"

     Our convention is that a "roof" is greater than any proper value.
     (A "ceiling" or "max" would be the largest proper value.)

diff --git a/include/ietf_constants.h b/include/ietf_constants.h
index a318922..cd81f8c 100644
--- a/include/ietf_constants.h
+++ b/include/ietf_constants.h
@@ -851,7 +851,7 @@ enum ikev2_trans_type_encr {
         IKEv2_ENCR_CAMELLIA_CCM_B = 26, /* CAMELLIA_CCM_12 RFC 5529 */
         IKEv2_ENCR_CAMELLIA_CCM_C = 27, /* CAMELLIA_CCM_16 RFC 5529 */
         IKEv2_ENCR_CHACHA20_POLY1305 = 28, /* RFC7634 */
+       IKEv2_ENCR_ROOF,

I'm a bit concerned about you adding an algorithm entry in the list that
is not real. What happens now when we receive an ENCR algo with number 29 ?

I'm surprised this passed the internal enum check too without crashing
because no name was added to the enum_names in constants.c ?

Maybe I should have called these MAX instead of ROOF? I purposefully
avoided adding an entry and choose to just have an alias name instead.


More information about the Swan-dev mailing list