[strongSwan-dev] [RFC PATCH 0/4]: Configurable reqids

Martin Willi martin at strongswan.org
Wed Apr 28 09:47:45 CEST 2010


Hi Adrian,

> This patchset implements the setting of static reqids for connections via
> configuration.

Thanks for your patchset. As the RC for 4.4.0 is already out and this
patchset breaks the API for many custom plugins, I'll apply it after the
final 4.4.0 release.

>  child_cfg_t *child_cfg_create(char *name, lifetime_cfg_t *lifetime,
>                                char *updown, bool hostaccess,
>                                ipsec_mode_t mode, action_t dpd_action,
>                                action_t close_action, bool ipcomp,
> -                              u_int32_t inactivity);
> +                              u_int32_t inactivity, u_int32_t reqid);

The child_cfg_create() function is used in many plugins and we have to
update them, too. git-grep is your friend.

> +       static u_int32_t reqid = 0;
> +       if (!config->get_reqid(config)) {
> +               /* reuse old reqid if we are rekeying an existing CHILD_SA */
> +               this->reqid = rekey ? rekey : ++reqid;
> +       } else {
> +               this->reqid = config->get_reqid(config);
> +               DBG1(DBG_CHD, "connection '%s' uses reqid %d from config",
> +                               config->get_name(config), this->reqid);
> +       }

For flow control, we usually set brackets on separate lines.


I already have fixed these two things while reviewing the patch. I'll
merge these changes to master after 4.4.0, no need to resubmit.

Thanks!
Martin





More information about the Dev mailing list