[Swan-dev] FYI, pass '0' or drop the next payload - np - parameter

Andrew Cagney andrew.cagney at gmail.com
Mon Jul 16 17:20:47 UTC 2018


Hugh, FYI,

When modifying code like this:

-                               if (!ship_v2N(c->send_no_esp_tfc ?
ISAKMP_NEXT_v2N : ISAKMP_NEXT_v2NONE,
-                                     ISAKMP_PAYLOAD_NONCRITICAL,
-                                     PROTO_v2_RESERVED,
-                                     &empty_chunk,
-                                     v2N_USE_TRANSPORT_MODE,
-                                     &empty_chunk,
-                                     outpbs))
-                               return STF_INTERNAL_ERROR;
+                               if (!ship_v2Ns(c->send_no_esp_tfc ?
ISAKMP_NEXT_v2N : ISAKMP_NEXT_v2NONE,
+                                     v2N_USE_TRANSPORT_MODE, outpbs))
+                                       return STF_INTERNAL_ERROR;

Dependant on the situation (i.e., which causes less churn), the np -
next payload parameter - you can either pass zero or simply drop the
parameter. The packet code will then fill in the required value.

(the NP handling will eventually be ripped out, but mean while ...)

BTW, what do 's' and 'sp' mean?

Andrew

New commits:
commit b858f9398aa5e9552b345ecea11f970774e7a8b6
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Mon Jul 16 09:15:14 2018 -0400

    pluto: reduce boilerplace in generating notify payloads and in
using critical()

    - Most calls to ship_v2N had stereotyped parameters.  Added,
      documented, and used ship_v2Ns and ship_v2Nsp wrapper functions to
      exploit this.


More information about the Swan-dev mailing list